Class: Lonelyplanet::Poi

Inherits:
Object
  • Object
show all
Defined in:
lib/lonely_planet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addressObject (readonly)

Returns the value of attribute address.



241
242
243
# File 'lib/lonely_planet.rb', line 241

def address
  @address
end

#distanceObject (readonly)

Returns the value of attribute distance.



245
246
247
# File 'lib/lonely_planet.rb', line 245

def distance
  @distance
end

#latitudeObject (readonly)

Returns the value of attribute latitude.



246
247
248
# File 'lib/lonely_planet.rb', line 246

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



247
248
249
# File 'lib/lonely_planet.rb', line 247

def longitude
  @longitude
end

#neighbourhoodObject (readonly)

Returns the value of attribute neighbourhood.



242
243
244
# File 'lib/lonely_planet.rb', line 242

def neighbourhood
  @neighbourhood
end

#node_idObject (readonly)

Returns the value of attribute node_id.



244
245
246
# File 'lib/lonely_planet.rb', line 244

def node_id
  @node_id
end

#tagsObject (readonly)

Returns the value of attribute tags.



243
244
245
# File 'lib/lonely_planet.rb', line 243

def tags
  @tags
end

#titleObject (readonly)

Returns the value of attribute title.



240
241
242
# File 'lib/lonely_planet.rb', line 240

def title
  @title
end

#transportObject (readonly)

Returns the value of attribute transport.



248
249
250
# File 'lib/lonely_planet.rb', line 248

def transport
  @transport
end