Class: Clin::GeneralOption

Inherits:
CommandOptionsMixin show all
Defined in:
lib/clin/general_option.rb

Direct Known Subclasses

HelpOptions

Instance Method Summary collapse

Methods inherited from CommandOptionsMixin

add_option, flag_option, general_option, opt_option, option, register_options, remove_general_option

Constructor Details

#initialize(config = {}) ⇒ GeneralOption

Returns a new instance of GeneralOption.



5
6
7
# File 'lib/clin/general_option.rb', line 5

def initialize(config = {})

end

Instance Method Details

#execute(_params) ⇒ Object

It get the params the general options needs and do whatever the option is suppose to do with it. Method called in the initialize of the command. This allow general options to be extracted when parsing a command line as well as calling the command directly in the code

Parameters:

  • _params (Hash)

    Params got in the command



13
14
# File 'lib/clin/general_option.rb', line 13

def execute(_params)
end