Class: Clin::GeneralOption
- Inherits:
-
CommandOptionsMixin
- Object
- CommandOptionsMixin
- Clin::GeneralOption
- Defined in:
- lib/clin/general_option.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#execute(_params) ⇒ Object
It get the params the general options needs and do whatever the option is suppose to do with it.
-
#initialize(config = {}) ⇒ GeneralOption
constructor
A new instance of GeneralOption.
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
13 14 |
# File 'lib/clin/general_option.rb', line 13 def execute(_params) end |