Class: Lonelyplanet::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Result

Returns a new instance of Result.



286
287
288
289
290
291
292
# File 'lib/lonely_planet.rb', line 286

def initialize(payload)
  @title = payload['title'].to_s
  @destination_id = payload['destination_id'].to_s.to_i
  @content_type = payload['content_type'].to_s
  @sub_type = payload['sub_type'].to_s
  @node_id = payload['node_id'].to_i
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



283
284
285
# File 'lib/lonely_planet.rb', line 283

def content_type
  @content_type
end

#destination_idObject (readonly)

Returns the value of attribute destination_id.



282
283
284
# File 'lib/lonely_planet.rb', line 282

def destination_id
  @destination_id
end

#node_idObject (readonly)

Returns the value of attribute node_id.



285
286
287
# File 'lib/lonely_planet.rb', line 285

def node_id
  @node_id
end

#sub_typeObject (readonly)

Returns the value of attribute sub_type.



284
285
286
# File 'lib/lonely_planet.rb', line 284

def sub_type
  @sub_type
end

#titleObject (readonly)

Returns the value of attribute title.



281
282
283
# File 'lib/lonely_planet.rb', line 281

def title
  @title
end