我将如何完成以下任务?
class Monkey
attr_setter(:name, new_name)
if is_supported(@version)
@name = new_name
else
raise ":name is not supported for #{@version.to_s}"
end
end
attr_getter(:name)
if is_supported(@version)
return @name
else
raise ":name is not supported for #{@version.to_s}"
end
end
end