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