Ruby - Methods
What will be the output of this Ruby code?
class Light
def on?
true
end
def on!
puts "Turning on"
end
end
light = Light.new
puts light.on?
light.on!