Class: Lonelyplanet::Bluelist

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#titleObject (readonly)

Returns the value of attribute title.



191
192
193
# File 'lib/lonely_planet.rb', line 191

def title
  @title
end

#votesObject (readonly)

Returns the value of attribute votes.



192
193
194
# File 'lib/lonely_planet.rb', line 192

def votes
  @votes
end