Class: RMeetup::Type::Rsvp

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(rsvp = {}) ⇒ Rsvp

Returns a new instance of Rsvp.



17
18
19
# File 'lib/rmeetup/type/rsvp.rb', line 17

def initialize(rsvp = {})
  self.rsvp = rsvp
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/rsvp.rb', line 21

def method_missing(id, *args)
  return self.rsvp[id.id2name]
end

Instance Attribute Details

#rsvpObject

Returns the value of attribute rsvp.



15
16
17
# File 'lib/rmeetup/type/rsvp.rb', line 15

def rsvp
  @rsvp
end

Instance Method Details

#latObject

Special accessors that need typecasting or other parsing



27
28
29
# File 'lib/rmeetup/type/rsvp.rb', line 27

def lat
  return self.rsvp['lat'].to_f
end

#lonObject



30
31
32
# File 'lib/rmeetup/type/rsvp.rb', line 30

def lon
  return self.rsvp['lon'].to_f
end