Class: CanTango::Configuration::Engine
- Inherits:
-
Object
- Object
- CanTango::Configuration::Engine
- Includes:
- ExecutionModes, Singleton
- Defined in:
- lib/cantango/configuration/engine.rb
Instance Method Summary collapse
Methods included from ExecutionModes
Instance Method Details
#off? ⇒ Boolean
22 23 24 |
# File 'lib/cantango/configuration/engine.rb', line 22 def off? !on? end |
#on? ⇒ Boolean
18 19 20 |
# File 'lib/cantango/configuration/engine.rb', line 18 def on? @state == :on end |
#reset! ⇒ Object
14 15 16 |
# File 'lib/cantango/configuration/engine.rb', line 14 def reset! @state = nil end |
#set(state = :on) ⇒ Object
9 10 11 12 |
# File 'lib/cantango/configuration/engine.rb', line 9 def set state = :on raise ArgumentError, "Must be :on or :off" unless !state || [:on, :off].include?(state) @state = state || :on end |