Class: Hardware::Component

Inherits:
Object
  • Object
show all
Defined in:
lib/hardware/component.rb

Direct Known Subclasses

Bin, CashRegister, Display, SequencedComponent

Instance Method Summary collapse

Constructor Details

#initialize(sensor_collection, actuator_collection) ⇒ Component

Returns a new instance of Component.



3
4
5
6
# File 'lib/hardware/component.rb', line 3

def initialize(sensor_collection, actuator_collection)
  @sensor_collection = sensor_collection
  @actuator_collection = actuator_collection
end

Instance Method Details

#monitor_changes(&block) ⇒ Object



9
10
11
# File 'lib/hardware/component.rb', line 9

def monitor_changes(&block)
  @changed_block = block
end

#resetObject



13
14
15
# File 'lib/hardware/component.rb', line 13

def reset
  # do noting on reset by default
end