Class: Mosaic::Foursquare::Tip
- Defined in:
- lib/mosaic/foursquare/tip.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#text ⇒ Object
Returns the value of attribute text.
-
#user ⇒ Object
Returns the value of attribute user.
-
#venue ⇒ Object
Returns the value of attribute venue.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Tip
constructor
A new instance of Tip.
Methods inherited from Object
query, request_count, request_count=
Methods included from Utils::Helpers
Constructor Details
#initialize(attributes = {}) ⇒ Tip
14 15 16 17 18 |
# File 'lib/mosaic/foursquare/tip.rb', line 14 def initialize(attributes = {}) super self.user &&= Mosaic::Foursquare::User.new(self.user) self.venue &&= Mosaic::Foursquare::Venue.new(self.venue) end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/mosaic/foursquare/tip.rb', line 6 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/mosaic/foursquare/tip.rb', line 6 def id @id end |
#text ⇒ Object
Returns the value of attribute text.
6 7 8 |
# File 'lib/mosaic/foursquare/tip.rb', line 6 def text @text end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/mosaic/foursquare/tip.rb', line 6 def user @user end |
#venue ⇒ Object
Returns the value of attribute venue.
6 7 8 |
# File 'lib/mosaic/foursquare/tip.rb', line 6 def venue @venue end |
Class Method Details
.find(id, options = {}) ⇒ Object
8 9 10 11 |
# File 'lib/mosaic/foursquare/tip.rb', line 8 def find(id, = {}) response = query("/tips/#{id}", ) self.new response['response']['tip'] end |