Class: Hardware::Button
- Inherits:
-
SequencedComponent
- Object
- Component
- SequencedComponent
- Hardware::Button
- Defined in:
- lib/hardware/button.rb
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize(sensor_collection, sequence_number) ⇒ Button
constructor
A new instance of Button.
- #press ⇒ Object
Methods inherited from Component
Constructor Details
#initialize(sensor_collection, sequence_number) ⇒ Button
Returns a new instance of Button.
5 6 7 |
# File 'lib/hardware/button.rb', line 5 def initialize(sensor_collection, sequence_number) super(sensor_collection, nil, sequence_number) end |
Instance Method Details
#configure ⇒ Object
13 14 15 |
# File 'lib/hardware/button.rb', line 13 def configure create_sensor_for(:button_press) end |
#press ⇒ Object
9 10 11 |
# File 'lib/hardware/button.rb', line 9 def press fire(:button_press) end |