<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>na_ah</author_name>
  <author_url>https://blog.hatena.ne.jp/na_ah/</author_url>
  <blog_title>na_ahのブログ</blog_title>
  <blog_url>https://na-ah.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>こんにちは！ 久しぶりの投稿ですが、勉強は続いています！ 今回は、Rubyでコンソールアプリを作る時に、便利なコマンドをまとめます。 画面のクリア 次のASCIIコードで画面全体がクリアされます。Windows環境では動作すると思います。 puts &quot;\e[H\e[2J&quot; キー入力のリアルタイム判定 次のコードはキー入力を受付したタイミングで（Enterを押さなくても）処理を行います。ループ内で実行することで、常にキー入力を監視して入力に応じて処理を変えることが可能になります。 require 'io/console' input = STDIN.getch while true case i…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fna-ah.hatenablog.com%2Fentry%2F2023%2F12%2F06%2F160122&quot; title=&quot;Rubyでコンソールアプリを作る時に便利なコマンド - na_ahのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-12-06 16:01:22</published>
  <title>Rubyでコンソールアプリを作る時に便利なコマンド</title>
  <type>rich</type>
  <url>https://na-ah.hatenablog.com/entry/2023/12/06/160122</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
