Class: BuildLights::Lights
- Inherits:
-
Object
- Object
- BuildLights::Lights
- Defined in:
- lib/buildlights/lights.rb
Constant Summary collapse
- RED =
1- GREEN =
2
Instance Method Summary collapse
- #failed ⇒ Object
-
#initialize(implementation = BottleRocket) ⇒ Lights
constructor
A new instance of Lights.
- #success ⇒ Object
Constructor Details
#initialize(implementation = BottleRocket) ⇒ Lights
Returns a new instance of Lights.
6 7 8 |
# File 'lib/buildlights/lights.rb', line 6 def initialize(implementation = BottleRocket) @implementation = implementation end |
Instance Method Details
#failed ⇒ Object
15 16 17 18 |
# File 'lib/buildlights/lights.rb', line 15 def failed @implementation.turn_on RED @implementation.turn_off GREEN end |
#success ⇒ Object
10 11 12 13 |
# File 'lib/buildlights/lights.rb', line 10 def success @implementation.turn_on GREEN @implementation.turn_off RED end |