Class: TripAdvisorBest::Museum
- Defined in:
- lib/tripadvisor_best/museum.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ranking ⇒ Object
Returns the value of attribute ranking.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Museum
constructor
A new instance of Museum.
Methods inherited from Place
#add_highlight_attributes, create_from_collection
Constructor Details
#initialize(attributes) ⇒ Museum
Returns a new instance of Museum.
7 8 9 10 |
# File 'lib/tripadvisor_best/museum.rb', line 7 def initialize(attributes) super self.class.all << self end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/tripadvisor_best/museum.rb', line 4 def description @description end |
#location ⇒ Object
Returns the value of attribute location.
4 5 6 |
# File 'lib/tripadvisor_best/museum.rb', line 4 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/tripadvisor_best/museum.rb', line 4 def name @name end |
#ranking ⇒ Object
Returns the value of attribute ranking.
4 5 6 |
# File 'lib/tripadvisor_best/museum.rb', line 4 def ranking @ranking end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/tripadvisor_best/museum.rb', line 4 def url @url end |
Class Method Details
.all ⇒ Object
12 13 14 |
# File 'lib/tripadvisor_best/museum.rb', line 12 def self.all @@all end |
.find(i) ⇒ Object
16 17 18 |
# File 'lib/tripadvisor_best/museum.rb', line 16 def self.find(i) self.all[i] end |