Sha256: c2b28071fc4e3c52af5145c3e64893afab9fcf8eeb7f89da1ef9900682f7b253
Contents?: true
Size: 481 Bytes
Versions: 1
Compression:
Stored size: 481 Bytes
Contents
# frozen-string-literal: true # bioshogi input_parser "68歩" "△76歩" if $0 == __FILE__ require "../cli" end module Bioshogi class Cli desc "input_parser", "入力" def input_parser(*argv) str = argv.join(" ") rows = InputParser.scan(str).collect do |str| {"入力" => str}.merge(InputParser.match!(str).named_captures) end tp rows end end end if $0 == __FILE__ Bioshogi::Cli.start(["input_parser", "68S", "△76歩"]) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bioshogi-0.0.3 | lib/bioshogi/cli/input_parser.rb |