Class: RMeetup::Type::Rsvp
- Inherits:
-
Object
- Object
- RMeetup::Type::Rsvp
- Defined in:
- lib/rmeetup/type/rsvp.rb
Overview
Edited by Jason Berlinsky on 1/20/11 to allow for arbitrary data access See www.meetup.com/meetup_api/docs/ew/rsvps/ for available fields
Instance Attribute Summary collapse
-
#rsvp ⇒ Object
(also: #to_h)
Returns the value of attribute rsvp.
Instance Method Summary collapse
-
#initialize(rsvp = {}) ⇒ Rsvp
constructor
A new instance of Rsvp.
-
#lat ⇒ Object
Special accessors that need typecasting or other parsing.
- #lon ⇒ Object
- #method_missing(id, *args) ⇒ Object
Constructor Details
#initialize(rsvp = {}) ⇒ Rsvp
Returns a new instance of Rsvp.
15 16 17 |
# File 'lib/rmeetup/type/rsvp.rb', line 15 def initialize(rsvp = {}) @rsvp = rsvp end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(id, *args) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/rmeetup/type/rsvp.rb', line 21 def method_missing(id, *args) if rsvp.has_key?(id.id2name) rsvp[id.id2name] else fail NoMethodError.new('no method') end end |
Instance Attribute Details
#rsvp ⇒ Object Also known as: to_h
Returns the value of attribute rsvp.
18 19 20 |
# File 'lib/rmeetup/type/rsvp.rb', line 18 def rsvp @rsvp end |
Instance Method Details
#lat ⇒ Object
Special accessors that need typecasting or other parsing
31 32 33 |
# File 'lib/rmeetup/type/rsvp.rb', line 31 def lat return self.rsvp['lat'].to_f end |
#lon ⇒ Object
34 35 36 |
# File 'lib/rmeetup/type/rsvp.rb', line 34 def lon return self.rsvp['lon'].to_f end |