Class: XRT::CLI
- Inherits:
-
Object
- Object
- XRT::CLI
- Defined in:
- lib/xrt/cli.rb
Instance Method Summary collapse
Instance Method Details
#execute(args) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/xrt/cli.rb', line 5 def execute(args) command_name = args.shift case command_name when 'dump' success = XRT::Command::Dump.new.execute(args) exit success ? 0 : 1 when 'extract' success = XRT::Command::Extract.new.execute(*args) exit success ? 0 : 1 when 'lcs' success = XRT::Command::LCS.new.execute(*args) exit success ? 0 : 1 else warn "command not found" exit 1 end end |