Class: Swappy::Commands::Swap
- Defined in:
- lib/swappy/commands/swap.rb
Constant Summary collapse
- ConfigSetNotFoundError =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Command
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options = {}) ⇒ Swap
constructor
A new instance of Swap.
Constructor Details
#initialize(options = {}) ⇒ Swap
Returns a new instance of Swap.
10 11 12 13 14 |
# File 'lib/swappy/commands/swap.rb', line 10 def initialize(={}) super @name = [:name] raise ConfigSetNotFoundError unless config_set end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/swappy/commands/swap.rb', line 6 def name @name end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/swappy/commands/swap.rb', line 16 def call switch_to_config_set end |