Class: Sappho::Heatmiser::Proxy::HeatmiserStatus::Schedule
- Inherits:
-
Object
- Object
- Sappho::Heatmiser::Proxy::HeatmiserStatus::Schedule
- Defined in:
- lib/sappho-heatmiser-proxy/heatmiser_status.rb
Instance Attribute Summary collapse
-
#schedule ⇒ Object
readonly
Returns the value of attribute schedule.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(raw, bytePosition) ⇒ Schedule
constructor
A new instance of Schedule.
Constructor Details
#initialize(raw, bytePosition) ⇒ Schedule
Returns a new instance of Schedule.
46 47 48 49 50 51 52 |
# File 'lib/sappho-heatmiser-proxy/heatmiser_status.rb', line 46 def initialize raw, bytePosition @schedule = [] (0 ... 4).map do |position| timedTemperature = TimedTemperature.new(raw, bytePosition + 3 * position) @schedule << timedTemperature if timedTemperature.valid? end end |
Instance Attribute Details
#schedule ⇒ Object (readonly)
Returns the value of attribute schedule.
44 45 46 |
# File 'lib/sappho-heatmiser-proxy/heatmiser_status.rb', line 44 def schedule @schedule end |
Instance Method Details
#description ⇒ Object
54 55 56 |
# File 'lib/sappho-heatmiser-proxy/heatmiser_status.rb', line 54 def description (@schedule.collect {|timedTemperature| timedTemperature.description}).join(' ') end |