Class: CanTango::Configuration::Engines::Engine
- Inherits:
-
Object
- Object
- CanTango::Configuration::Engines::Engine
- Defined in:
- lib/cantango/configuration/engines/engine.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#off? ⇒ Boolean
18 19 20 |
# File 'lib/cantango/configuration/engines/engine.rb', line 18 def off? !on? end |
#on? ⇒ Boolean
14 15 16 |
# File 'lib/cantango/configuration/engines/engine.rb', line 14 def on? @state == :on end |
#reset! ⇒ Object
10 11 12 |
# File 'lib/cantango/configuration/engines/engine.rb', line 10 def reset! @state = nil end |
#set(state = :on) ⇒ Object
5 6 7 8 |
# File 'lib/cantango/configuration/engines/engine.rb', line 5 def set state = :on raise ArgumentError, "Must be :on or :off" unless !state || [:on, :off].include?(state) @state = state || :on end |