lib/input.rb in narou-2.1.1.pre.test1 vs lib/input.rb in narou-2.2.0
- old
+ new
@@ -41,10 +41,10 @@
# 値は :default の要素を返す。:default がない場合は先頭の要素
# @return: 選ばれた選択肢を返す
#
# @example:
# choices = { "ja" => "日本語", "en" => "English", default: "ja" }
- # Narou::Input.choose("select a language?", choices)
+ # Narou::Input.choose("Title: Select language", "Please select a language?", choices)
#
def choose(title, message, choices)
default = choices[:default] || choices.first[0]
return default unless $stdin.tty?
puts title