Professional Documents
Culture Documents
HKL Tomato PDF
HKL Tomato PDF
Tomato.new = function(color)
return {color: color? Tomato.Color.red}
end
Tomato.throw = function(tmto)
puts "Threw a " + tmto.color + " tomato"
end
tmto = Tomato.new()
tmto2 = Tomato.new(Tomato.Color.blue)
Tomato.throw(tmto)
Tomato.throw(tmto2)