Module: Rodish::Plugins::AfterOptionsHook::CommandMethods

Defined in:
lib/rodish/plugins/after_options_hook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#after_optionsObject

A hook to execute after parsing options for the command.



27
28
29
# File 'lib/rodish/plugins/after_options_hook.rb', line 27

def after_options
  @after_options
end

Instance Method Details

#process_command_options(context, options, argv) ⇒ Object

Run after_options hook if present after parsing options.



30
31
32
33
# File 'lib/rodish/plugins/after_options_hook.rb', line 30

def process_command_options(context, options, argv)
  super
  context.instance_exec(argv, options, &after_options) if after_options
end