class Systems
Public Class Methods
new()
click to toggle source
# File lib/Systems.rb, line 3 def initialize() @heating = Relais.new @cooling = Relais.new end
Public Instance Methods
run()
click to toggle source
# File lib/Systems.rb, line 25 def run() "The heating is #{@heating.status}\nThe cooling is #{@cooling.status}" end
set(value)
click to toggle source
# File lib/Systems.rb, line 8 def set(value) if value > 0 @heating.off @cooling.on end if value < 0 @heating.on @cooling.off end if value == 0 @heating.off @cooling.off end end