Module: Commander::Delegates

Included in:
Methods
Defined in:
lib/commander/delegates.rb

Overview

Delegates

Mixed into Commander::Methods to expose the singleton Commander::Runner instance's DSL (+command+, program, run!, etc.) as top-level methods, so scripts can call them directly instead of reaching through Commander::Runner.instance.

Instance Method Summary collapse

Instance Method Details

#defined_commandsObject

Delegates to Commander::Runner#commands, returning the hash of registered command name => Commander::Command pairs.



33
34
35
# File 'lib/commander/delegates.rb', line 33

def defined_commands(...)
  ::Commander::Runner.instance.commands(...)
end