Class: Sappho::Heatmiser::Proxy::HeatmiserStatus::Schedule

Inherits:
Object
  • Object
show all
Defined in:
lib/sappho-heatmiser-proxy/heatmiser_status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#scheduleObject (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

#descriptionObject



54
55
56
# File 'lib/sappho-heatmiser-proxy/heatmiser_status.rb', line 54

def description
  (@schedule.collect {|timedTemperature| timedTemperature.description}).join(' ')
end