class ThermostatApplication

Public Instance Methods

run() click to toggle source
# File lib/app.rb, line 5
def run
    thermostat = Thermostat.new(20.51)
    # thermostat.currentValue = rand(15..25)
    # thermostat.wantedValue = 21.0
    puts "current temp: #{thermostat.current} °C" 
    puts "wanted temp: #{thermostat.wanted} °C"
    puts "range: #{thermostat.range} °C"
    puts "cooling: #{thermostat.cooling?}"
    puts "heating: #{thermostat.heating?}"
    puts thermostat.state
end