Class: VSM::CLI
- Inherits:
-
Object
- Object
- VSM::CLI
- Defined in:
- lib/vsm/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.start(argv = ARGV) ⇒ Object
8 9 10 |
# File 'lib/vsm/cli.rb', line 8 def self.start(argv = ARGV) new.run(argv) end |
Instance Method Details
#run(argv) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/vsm/cli.rb', line 12 def run(argv) cmd = argv.shift case cmd when 'new' run_new(argv) when nil, '-h', '--help', 'help' puts help_text else warn "Unknown command: #{cmd}\n" puts help_text exit 1 end end |