Class: TripAdvisorBest::Attraction

Inherits:
Place
  • Object
show all
Defined in:
lib/tripadvisor_best/attraction.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Place

#add_highlight_attributes, create_from_collection

Constructor Details

#initialize(attributes) ⇒ Attraction

Returns a new instance of Attraction.



7
8
9
10
# File 'lib/tripadvisor_best/attraction.rb', line 7

def initialize(attributes)
  super
  self.class.all << self
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/tripadvisor_best/attraction.rb', line 4

def description
  @description
end

#locationObject

Returns the value of attribute location.



4
5
6
# File 'lib/tripadvisor_best/attraction.rb', line 4

def location
  @location
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/tripadvisor_best/attraction.rb', line 4

def name
  @name
end

#rankingObject

Returns the value of attribute ranking.



4
5
6
# File 'lib/tripadvisor_best/attraction.rb', line 4

def ranking
  @ranking
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/tripadvisor_best/attraction.rb', line 4

def url
  @url
end

Class Method Details

.allObject



12
13
14
# File 'lib/tripadvisor_best/attraction.rb', line 12

def self.all
  @@all
end

.find(i) ⇒ Object



16
17
18
# File 'lib/tripadvisor_best/attraction.rb', line 16

def self.find(i)
  self.all[i]
end