Sha256: b440d1b171a19d08ad02ca4ef2599a06cf6646474e259f35ccc6fda9b16715d6
Contents?: true
Size: 490 Bytes
Versions: 5
Compression:
Stored size: 490 Bytes
Contents
module Echelon class Park def ride_list {} end def rides ride_list.inject([]) do |r, e| r << create_ride_object(e[0]) end end def find_by_name(ride) raise ArgumentError, "Unknown ride name" unless ride_list.has_value?(ride) ref = ride_list.index(ride) create_ride_object(ref) end def find_by_id(ref) raise ArgumentError, "Unknown ride name" unless ride_list.has_key?(ref) create_ride_object(ref) end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
echelon-1.0.1 | lib/echelon/park.rb |
echelon-1.0.0 | lib/echelon/park.rb |
echelon-0.0.5 | lib/echelon/park.rb |
echelon-0.0.4 | lib/echelon/park.rb |
echelon-0.0.3 | lib/echelon/park.rb |