class JsonParser
Public Instance Methods
getCirculation(thermostat)
click to toggle source
# File lib/JsonParser.rb, line 3 def getCirculation(thermostat) heating_on = {"heating":"on", "airo":"off"} airco_on = {"heating":"off", "airco":"on"} if thermostat.cooling? == true circulation = JSON.pretty_generate(airco_on) elsif thermostat.heating? == true circulation = JSON.pretty_generate(heating_on) else circulation = "nothing to do" end return circulation end