Class: RMeetup::Type::Photo
- Inherits:
-
Object
- Object
- RMeetup::Type::Photo
- Defined in:
- lib/rmeetup/type/photo.rb
Overview
Edited by Jason Berlinsky on 1/20/11 to allow for arbitrary data access See www.meetup.com/meetup_api/docs/photos/ for available fields
Instance Attribute Summary collapse
-
#photo ⇒ Object
Returns the value of attribute photo.
Instance Method Summary collapse
-
#created ⇒ Object
Special accessors that need typecasting or other parsing.
-
#initialize(photo = {}) ⇒ Photo
constructor
A new instance of Photo.
- #method_missing(id, *args) ⇒ Object
Constructor Details
#initialize(photo = {}) ⇒ Photo
Returns a new instance of Photo.
17 18 19 |
# File 'lib/rmeetup/type/photo.rb', line 17 def initialize(photo = {}) self.photo = photo end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(id, *args) ⇒ Object
21 22 23 |
# File 'lib/rmeetup/type/photo.rb', line 21 def method_missing(id, *args) return self.photo[id.id2name] end |
Instance Attribute Details
#photo ⇒ Object
Returns the value of attribute photo.
15 16 17 |
# File 'lib/rmeetup/type/photo.rb', line 15 def photo @photo end |
Instance Method Details
#created ⇒ Object
Special accessors that need typecasting or other parsing
27 28 29 |
# File 'lib/rmeetup/type/photo.rb', line 27 def created return DateTime.parse(self.photo['created']) end |