Class: Mosaic::Foursquare::Update
- Defined in:
- lib/mosaic/foursquare/update.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#photos ⇒ Object
Returns the value of attribute photos.
-
#shout ⇒ Object
Returns the value of attribute shout.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Update
constructor
A new instance of Update.
Methods inherited from Object
query, request_count, request_count=
Methods included from Utils::Helpers
Constructor Details
#initialize(attributes = {}) ⇒ Update
Returns a new instance of Update.
16 17 18 19 |
# File 'lib/mosaic/foursquare/update.rb', line 16 def initialize(attributes = {}) super self.photos &&= self.photos['items'].collect { |item| Mosaic::Foursquare::Photo.new(item) } end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/mosaic/foursquare/update.rb', line 6 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/mosaic/foursquare/update.rb', line 6 def id @id end |
#photos ⇒ Object
Returns the value of attribute photos.
6 7 8 |
# File 'lib/mosaic/foursquare/update.rb', line 6 def photos @photos end |
#shout ⇒ Object
Returns the value of attribute shout.
6 7 8 |
# File 'lib/mosaic/foursquare/update.rb', line 6 def shout @shout end |
Class Method Details
.from_venue(venue_response_data) ⇒ Object
9 10 11 12 13 |
# File 'lib/mosaic/foursquare/update.rb', line 9 def from_venue(venue_response_data) venue_response_data["pageUpdates"]["items"].map do |update| new(update) end end |