Ruby - Classes and Objects
Identify the error in this Ruby class:
class Car
attr_reader :model
def initialize(model)
@model = model
end
def model=(value)
@model = value
end
end
car = Car.new('Sedan')
car.model = 'SUV'
puts car.model