Sha256: 58667e98125b36676be13a9aac4e9225b29c8c1ad15ba779717ed2e88a21bad3
Contents?: true
Size: 434 Bytes
Versions: 2
Compression:
Stored size: 434 Bytes
Contents
module Xway class Cli def initialize api=Api.new, out=STDOUT @api = api @out = out end def start commands = Xway.parameter.rest if Xway.parameter[:version] @out.puts "xway #{VERSION}" elsif commands.empty? Xway.parameter.print_help! else @out.puts @api.request(*commands) end rescue MissingParameter => e @out.puts e.message end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
xway-0.0.3.beta | lib/xway/cli.rb |
xway-0.0.2.beta | lib/xway/cli.rb |