Class: BalboaParkItineraryIdeas::Itinerary
- Inherits:
-
Object
- Object
- BalboaParkItineraryIdeas::Itinerary
- Defined in:
- lib/balboa_park_itinerary_ideas/itinerary.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#attractions ⇒ Object
an array of hashes with names, descriptions, and URLs of the attractions.
-
#summary ⇒ Object
an array of hashes with names, descriptions, and URLs of the attractions.
-
#title ⇒ Object
an array of hashes with names, descriptions, and URLs of the attractions.
-
#url ⇒ Object
an array of hashes with names, descriptions, and URLs of the attractions.
Class Method Summary collapse
- .all ⇒ Object
-
.find(id) ⇒ Object
returns the itinerary that matches the user input.
Instance Method Summary collapse
Instance Attribute Details
#attractions ⇒ Object
an array of hashes with names, descriptions, and URLs of the attractions
2 3 4 |
# File 'lib/balboa_park_itinerary_ideas/itinerary.rb', line 2 def attractions @attractions end |
#summary ⇒ Object
an array of hashes with names, descriptions, and URLs of the attractions
2 3 4 |
# File 'lib/balboa_park_itinerary_ideas/itinerary.rb', line 2 def summary @summary end |
#title ⇒ Object
an array of hashes with names, descriptions, and URLs of the attractions
2 3 4 |
# File 'lib/balboa_park_itinerary_ideas/itinerary.rb', line 2 def title @title end |
#url ⇒ Object
an array of hashes with names, descriptions, and URLs of the attractions
2 3 4 |
# File 'lib/balboa_park_itinerary_ideas/itinerary.rb', line 2 def url @url end |
Class Method Details
.all ⇒ Object
6 7 8 |
# File 'lib/balboa_park_itinerary_ideas/itinerary.rb', line 6 def self.all @@all end |
.find(id) ⇒ Object
returns the itinerary that matches the user input
15 16 17 |
# File 'lib/balboa_park_itinerary_ideas/itinerary.rb', line 15 def self.find(id) self.all[id-1] end |
Instance Method Details
#save ⇒ Object
10 11 12 |
# File 'lib/balboa_park_itinerary_ideas/itinerary.rb', line 10 def save @@all << self end |