class Ticket
VENUES = ["Convention center", "Fairy", "Town hall" ]
def initialize(venue, date)
if VENUES.include?(venue)
@venue = venue
else
raise ArgumentError, "Unknown venue #{venue}"
end
@date = date
end
end
puts "the venues are: "
puts Ticket::VENUES
change constant
#change constant
venues = Ticket::VENUES
venues << "High school Gym"
Top comments (0)