Class: RMeetup::Type::Event
- Inherits:
-
Object
- Object
- RMeetup::Type::Event
- Defined in:
- lib/rmeetup/type/event.rb
Overview
RMeetup::Type::Event
Data wraper for a Event fethcing response Used to access result attributes as well as progammatically fetch relative data types based on this event.
Instance Attribute Summary collapse
-
#event_url ⇒ Object
Returns the value of attribute event_url.
-
#fee ⇒ Object
Returns the value of attribute fee.
-
#feecurrency ⇒ Object
Returns the value of attribute feecurrency.
-
#feedesc ⇒ Object
Returns the value of attribute feedesc.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#name ⇒ Object
Returns the value of attribute name.
-
#photo_url ⇒ Object
Returns the value of attribute photo_url.
-
#rsvpcount ⇒ Object
Returns the value of attribute rsvpcount.
-
#time ⇒ Object
Returns the value of attribute time.
-
#updated ⇒ Object
Returns the value of attribute updated.
Instance Method Summary collapse
-
#initialize(event = {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(event = {}) ⇒ Event
Returns a new instance of Event.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rmeetup/type/event.rb', line 14 def initialize(event = {}) self.id = event['id'].to_i self.name = event['name'] self.updated = DateTime.parse(event['updated']) self.time = DateTime.parse(event['time']) self.photo_url = event['photo_url'] self.lat = event['lat'].to_f self.lon = event['lon'].to_f self.event_url = event['event_url'] self.rsvpcount = event['rsvpcount'].to_i self.fee = event['fee'] self.feecurrency = event['feecurrency'] self.feedesc = event['feedesc'] end |
Instance Attribute Details
#event_url ⇒ Object
Returns the value of attribute event_url.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def event_url @event_url end |
#fee ⇒ Object
Returns the value of attribute fee.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def fee @fee end |
#feecurrency ⇒ Object
Returns the value of attribute feecurrency.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def feecurrency @feecurrency end |
#feedesc ⇒ Object
Returns the value of attribute feedesc.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def feedesc @feedesc end |
#id ⇒ Object
Returns the value of attribute id.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def id @id end |
#lat ⇒ Object
Returns the value of attribute lat.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def lon @lon end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def name @name end |
#photo_url ⇒ Object
Returns the value of attribute photo_url.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def photo_url @photo_url end |
#rsvpcount ⇒ Object
Returns the value of attribute rsvpcount.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def rsvpcount @rsvpcount end |
#time ⇒ Object
Returns the value of attribute time.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def time @time end |
#updated ⇒ Object
Returns the value of attribute updated.
11 12 13 |
# File 'lib/rmeetup/type/event.rb', line 11 def updated @updated end |