Top Level Namespace
- Includes:
- GLI
Defined Under Namespace
Modules: Bozo
Instance Method Summary collapse
-
#bozo_command(*command_names) ⇒ Object
Helper method for defining a command that invokes a bozo task.
Instance Method Details
#bozo_command(*command_names) ⇒ Object
Helper method for defining a command that invokes a bozo task.
The first provided name will be passed on to bozo.
Takes an optional block for defining command-specific flags and switches.
67 68 69 70 71 72 73 74 75 |
# File 'lib/bozo.rb', line 67 def bozo_command(*command_names) command_name = command_names.first command command_names do |c| yield c if block_given? c.action do |, , arguments| @executor.execute command_name, , ENV.to_hash end end end |