Class: ThermostatApplication

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

Instance Method Summary collapse

Instance Method Details

#runObject



5
6
7
8
9
10
11
12
13
14
15
# 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