Module: Quickl::Command::Delegator::InstanceMethods
- Defined in:
- lib/quickl/command/delegator.rb
Instance Method Summary collapse
- #execute(argv) ⇒ Object
-
#run(argv = [], requester = nil) ⇒ Object
Run the command by delegation.
Instance Method Details
#execute(argv) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/quickl/command/delegator.rb', line 14 def execute(argv) if cmd = argv.shift Quickl.sub_command!(self, cmd).run(argv, self) else raise Quickl::Help.new(cmd.nil? ? 0 : -1) end end |
#run(argv = [], requester = nil) ⇒ Object
Run the command by delegation
7 8 9 10 11 12 |
# File 'lib/quickl/command/delegator.rb', line 7 def run(argv = [], requester = nil) @requester = requester my_argv, rest = split_argv(argv) (my_argv) execute(rest) end |