lib/bioshogi/input_parser.rb in bioshogi-0.0.4 vs lib/bioshogi/input_parser.rb in bioshogi-0.0.5

- old
+ new

@@ -2,9 +2,18 @@ module Bioshogi module InputParser extend self + concern :CLI do + included do + desc "input_match", "指し手の一つ分の入力の読み取り" + def input_match(*argv) + InputParser.check(argv.join(" ")) + end + end + end + def check(text) rows = InputParser.scan(text).collect do |str| {"入力" => str}.merge(match!(str).named_captures) end tp rows