2010-12-18から1日間の記事一覧

HighLine:Examples:Type conversion for answers

まんま require "highline/import" p ask("Birthday? ", Date).to_s p ask("Interests? (comma sep list) ", lambda { |str| str.split(/,\s*/) }) で、 Birthday? 2011-1-1 "2011-01-01" Interests? (comma sep list) foo, bar , baz ["foo", "bar ", "baz"]