Class: Lonelyplanet::Destination

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Destination

Returns a new instance of Destination.



219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/lonely_planet.rb', line 219

def initialize(payload)
  @title = payload['title'].to_s
  @intro_mini = payload['intro_mini'].to_s
  @intro_short = payload['into_short'].to_s
  @intro_medium = payload['intro_medium'].to_s
  @history_modern = payload['history_modern'].to_s
  @history_pre_c20 = payload['history_pre_c20'].to_s
  @history_recent = payload['history_recent'].to_s
  @weather = payload['weather'].to_s
  @latitude = payload['latitude'].to_s
  @longitude = payload['longitude'].to_s
  @node_id = payload['node_id'].to_s
  @sleep = payload['sleep'][0]
  @night = payload['night'][0]
  @shop = payload['shop'][0]
  @see = payload['see'][0]
  @eat  = payload['eat'][0]
end

Instance Attribute Details

#eatObject (readonly)

Returns the value of attribute eat.



217
218
219
# File 'lib/lonely_planet.rb', line 217

def eat
  @eat
end

#history_modernObject (readonly)

Returns the value of attribute history_modern.



206
207
208
# File 'lib/lonely_planet.rb', line 206

def history_modern
  @history_modern
end

#history_pre_c20Object (readonly)

Returns the value of attribute history_pre_c20.



207
208
209
# File 'lib/lonely_planet.rb', line 207

def history_pre_c20
  @history_pre_c20
end

#history_recentObject (readonly)

Returns the value of attribute history_recent.



208
209
210
# File 'lib/lonely_planet.rb', line 208

def history_recent
  @history_recent
end

#intro_mediumObject (readonly)

Returns the value of attribute intro_medium.



205
206
207
# File 'lib/lonely_planet.rb', line 205

def intro_medium
  @intro_medium
end

#intro_miniObject (readonly)

Returns the value of attribute intro_mini.



203
204
205
# File 'lib/lonely_planet.rb', line 203

def intro_mini
  @intro_mini
end

#intro_shortObject (readonly)

Returns the value of attribute intro_short.



204
205
206
# File 'lib/lonely_planet.rb', line 204

def intro_short
  @intro_short
end

#latitudeObject (readonly)

Returns the value of attribute latitude.



210
211
212
# File 'lib/lonely_planet.rb', line 210

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



211
212
213
# File 'lib/lonely_planet.rb', line 211

def longitude
  @longitude
end

#nightObject (readonly)

Returns the value of attribute night.



214
215
216
# File 'lib/lonely_planet.rb', line 214

def night
  @night
end

#node_idObject (readonly)

Returns the value of attribute node_id.



212
213
214
# File 'lib/lonely_planet.rb', line 212

def node_id
  @node_id
end

#seeObject (readonly)

Returns the value of attribute see.



216
217
218
# File 'lib/lonely_planet.rb', line 216

def see
  @see
end

#shopObject (readonly)

Returns the value of attribute shop.



215
216
217
# File 'lib/lonely_planet.rb', line 215

def shop
  @shop
end

#sleepObject (readonly)

Returns the value of attribute sleep.



213
214
215
# File 'lib/lonely_planet.rb', line 213

def sleep
  @sleep
end

#titleObject (readonly)

Returns the value of attribute title.



202
203
204
# File 'lib/lonely_planet.rb', line 202

def title
  @title
end

#weatherObject (readonly)

Returns the value of attribute weather.



209
210
211
# File 'lib/lonely_planet.rb', line 209

def weather
  @weather
end