Class: Lonelyplanet::Bluelist
- Inherits:
-
Object
- Object
- Lonelyplanet::Bluelist
- Defined in:
- lib/lonely_planet.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#votes ⇒ Object
readonly
Returns the value of attribute votes.
Instance Method Summary collapse
-
#initialize(payload) ⇒ Bluelist
constructor
A new instance of Bluelist.
Constructor Details
#initialize(payload) ⇒ Bluelist
Returns a new instance of Bluelist.
194 195 196 197 |
# File 'lib/lonely_planet.rb', line 194 def initialize(payload) @title = payload['title'].to_s @votes = payload['votes'].to_i rescue 0 # they never write 0 for some reason. end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
191 192 193 |
# File 'lib/lonely_planet.rb', line 191 def title @title end |
#votes ⇒ Object (readonly)
Returns the value of attribute votes.
192 193 194 |
# File 'lib/lonely_planet.rb', line 192 def votes @votes end |