入出力 標準入力を隠す require 'io/console' password = STDIN.noecho(&:gets).chomp 日付・時刻 Time.now.strftime("%Y/%m/%d %H:%M:%S") # => "2013/09/20 15:08:22"