Ruby - Classes and Objects
Identify the error in this Ruby class that tries to customize
to_s:
class Car
def initialize(model)
@model = model
end
def to_s
"Car model: " + model
end
end
c = Car.new("Tesla")
puts c.to_s