Class: RMeetup::Type::Rsvp

Inherits:
Object
  • Object
show all
Defined in:
lib/rmeetup/type/rsvp.rb

Overview

RMeetup::Type::Rsvp

Data wraper for a Rsvp fethcing response Used to access result attributes as well as progammatically fetch relative data types based on this rsvp.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rsvp = {}) ⇒ Rsvp

Returns a new instance of Rsvp.



13
14
15
16
17
18
19
20
21
22
# File 'lib/rmeetup/type/rsvp.rb', line 13

def initialize(rsvp = {})
  self.name         = rsvp['name']
  self.link         = rsvp['link']
  self.comment      = rsvp['comment']
  self.lat          = rsvp['lat'].to_f
  self.lon          = rsvp['lon'].to_f
  self.country      = rsvp['country']
  self.state        = rsvp['state']
  self.city         = rsvp['city']
end

Instance Attribute Details

#cityObject

Returns the value of attribute city.



11
12
13
# File 'lib/rmeetup/type/rsvp.rb', line 11

def city
  @city
end

#commentObject

Returns the value of attribute comment.



11
12
13
# File 'lib/rmeetup/type/rsvp.rb', line 11

def comment
  @comment
end

#countryObject

Returns the value of attribute country.



11
12
13
# File 'lib/rmeetup/type/rsvp.rb', line 11

def country
  @country
end

#latObject

Returns the value of attribute lat.



11
12
13
# File 'lib/rmeetup/type/rsvp.rb', line 11

def lat
  @lat
end

Returns the value of attribute link.



11
12
13
# File 'lib/rmeetup/type/rsvp.rb', line 11

def link
  @link
end

#lonObject

Returns the value of attribute lon.



11
12
13
# File 'lib/rmeetup/type/rsvp.rb', line 11

def lon
  @lon
end

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/rmeetup/type/rsvp.rb', line 11

def name
  @name
end

#stateObject

Returns the value of attribute state.



11
12
13
# File 'lib/rmeetup/type/rsvp.rb', line 11

def state
  @state
end