class ThermostatApplication
Public Class Methods
new()
click to toggle source
# File lib/Thermostatregulation.rb, line 9 def initialize() unit = ARGV[0] current = ARGV[1].to_i wanted = ARGV[2].to_i unitChoice = Unit.new(current,wanted,unit) thermostat = Regulation.new(current, 0.5) led1 = Led.new("orange") unitChoice = Unit.new(current,wanted,unit) unitChoice.calculateUnit thermostat.regulation(wanted) led1.ledColor(thermostat.heating,thermostat.cooling) print1 = Print.new() print1.printHeating(thermostat.heating) print1.printCooling(thermostat.cooling) print1.printLed(led1.led) end