Class: Relais
- Inherits:
-
Object
- Object
- Relais
- Defined in:
- lib/relais.rb
Instance Method Summary collapse
-
#initialize ⇒ Relais
constructor
A new instance of Relais.
- #off ⇒ Object
- #on ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize ⇒ Relais
Returns a new instance of Relais.
2 3 4 |
# File 'lib/relais.rb', line 2 def initialize @state = false end |
Instance Method Details
#off ⇒ Object
10 11 12 |
# File 'lib/relais.rb', line 10 def off @state = false end |
#on ⇒ Object
6 7 8 |
# File 'lib/relais.rb', line 6 def on @state = true end |
#status ⇒ Object
14 15 16 |
# File 'lib/relais.rb', line 14 def status return @state end |