Class: Clin::GeneralOption
- Inherits:
-
Object
- Object
- Clin::GeneralOption
- Includes:
- CommandMixin::Options
- Defined in:
- lib/clin/general_option.rb
Overview
Parent class for reusable options across commands
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.
Constructor Details
#initialize(_config = {}) ⇒ GeneralOption
Returns a new instance of GeneralOption.
7 8 |
# File 'lib/clin/general_option.rb', line 7 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
15 16 |
# File 'lib/clin/general_option.rb', line 15 def execute(_params) end |