Class: Lonelyplanet::Poi
- Inherits:
-
Object
- Object
- Lonelyplanet::Poi
- Defined in:
- lib/lonely_planet.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#neighbourhood ⇒ Object
readonly
Returns the value of attribute neighbourhood.
-
#node_id ⇒ Object
readonly
Returns the value of attribute node_id.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#transport ⇒ Object
readonly
Returns the value of attribute transport.
Instance Method Summary collapse
-
#initialize(payload) ⇒ Poi
constructor
A new instance of Poi.
Constructor Details
#initialize(payload) ⇒ Poi
Returns a new instance of Poi.
250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/lonely_planet.rb', line 250 def initialize(payload) @title = payload['title'].to_s @address = payload['address'].to_s @neighbourhood = payload['neighbourhood'].to_s @tags = payload['tags'].to_s @node_id = payload['node_id'].to_s @distance = payload['distance'] @latitude = payload['latitude'] @longitude = payload['longitude'] @transport = payload['transport'] @email = payload['email'] @website = payload['website'] @review_summary = payload['review_summary'] end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
241 242 243 |
# File 'lib/lonely_planet.rb', line 241 def address @address end |
#distance ⇒ Object (readonly)
Returns the value of attribute distance.
245 246 247 |
# File 'lib/lonely_planet.rb', line 245 def distance @distance end |
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
246 247 248 |
# File 'lib/lonely_planet.rb', line 246 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
247 248 249 |
# File 'lib/lonely_planet.rb', line 247 def longitude @longitude end |
#neighbourhood ⇒ Object (readonly)
Returns the value of attribute neighbourhood.
242 243 244 |
# File 'lib/lonely_planet.rb', line 242 def neighbourhood @neighbourhood end |
#node_id ⇒ Object (readonly)
Returns the value of attribute node_id.
244 245 246 |
# File 'lib/lonely_planet.rb', line 244 def node_id @node_id end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
243 244 245 |
# File 'lib/lonely_planet.rb', line 243 def @tags end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
240 241 242 |
# File 'lib/lonely_planet.rb', line 240 def title @title end |
#transport ⇒ Object (readonly)
Returns the value of attribute transport.
248 249 250 |
# File 'lib/lonely_planet.rb', line 248 def transport @transport end |