Class: Escort::ActionCommand::EscortUtilityCommand
- Defined in:
- lib/escort/action_command/escort_utility_command.rb
Instance Attribute Summary collapse
-
#setup ⇒ Object
readonly
Returns the value of attribute setup.
Attributes inherited from Base
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(setup, options, arguments, config = {}) ⇒ EscortUtilityCommand
constructor
A new instance of EscortUtilityCommand.
Constructor Details
#initialize(setup, options, arguments, config = {}) ⇒ EscortUtilityCommand
Returns a new instance of EscortUtilityCommand.
6 7 8 9 |
# File 'lib/escort/action_command/escort_utility_command.rb', line 6 def initialize(setup, , arguments, config = {}) super(, arguments, config) @setup = setup end |
Instance Attribute Details
#setup ⇒ Object (readonly)
Returns the value of attribute setup.
4 5 6 |
# File 'lib/escort/action_command/escort_utility_command.rb', line 4 def setup @setup end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/escort/action_command/escort_utility_command.rb', line 11 def execute = if [:create_config_given] create_config([:create_config]) elsif [:create_default_config_given] create_default_config elsif [:update_config_given] update_config([:update_config]) elsif [:update_default_config_given] update_default_config end end |