Class: Lonelyplanet::Result
- Inherits:
-
Object
- Object
- Lonelyplanet::Result
- Defined in:
- lib/lonely_planet.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#destination_id ⇒ Object
readonly
Returns the value of attribute destination_id.
-
#node_id ⇒ Object
readonly
Returns the value of attribute node_id.
-
#sub_type ⇒ Object
readonly
Returns the value of attribute sub_type.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(payload) ⇒ Result
constructor
A new instance of Result.
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_type ⇒ Object (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_id ⇒ Object (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_id ⇒ Object (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_type ⇒ Object (readonly)
Returns the value of attribute sub_type.
284 285 286 |
# File 'lib/lonely_planet.rb', line 284 def sub_type @sub_type end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
281 282 283 |
# File 'lib/lonely_planet.rb', line 281 def title @title end |