Class: RMeetup::Type::Venue
- Inherits:
-
Object
- Object
- RMeetup::Type::Venue
show all
- Defined in:
- lib/rmeetup/type/venue.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(venue = {}) ⇒ Venue
Returns a new instance of Venue.
18
19
20
|
# File 'lib/rmeetup/type/venue.rb', line 18
def initialize(venue = {})
self.venue = venue
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(id, *args) ⇒ Object
22
23
24
|
# File 'lib/rmeetup/type/venue.rb', line 22
def method_missing(id, *args)
return self.venue[id.id2name]
end
|
Instance Attribute Details
#venue ⇒ Object
Returns the value of attribute venue.
16
17
18
|
# File 'lib/rmeetup/type/venue.rb', line 16
def venue
@venue
end
|
Instance Method Details
#address_1 ⇒ Object
37
38
39
|
# File 'lib/rmeetup/type/venue.rb', line 37
def address_1
return self.venue['address_1'].to_s
end
|
#city ⇒ Object
40
41
42
|
# File 'lib/rmeetup/type/venue.rb', line 40
def city
return self.venue['city'].to_s
end
|
#country ⇒ Object
43
44
45
|
# File 'lib/rmeetup/type/venue.rb', line 43
def country
return self.venue['country'].to_s
end
|
#distance ⇒ Object
46
47
48
|
# File 'lib/rmeetup/type/venue.rb', line 46
def distance
return self.venue['distance'].to_i
end
|
#id ⇒ Object
Special accessors that need typecasting or other parsing
28
29
30
|
# File 'lib/rmeetup/type/venue.rb', line 28
def id
return self.venue['id'].to_i
end
|
#lat ⇒ Object
55
56
57
|
# File 'lib/rmeetup/type/venue.rb', line 55
def lat
return self.venue['lat'].to_f
end
|
#lon ⇒ Object
58
59
60
|
# File 'lib/rmeetup/type/venue.rb', line 58
def lon
return self.venue['lon'].to_f
end
|
#rating ⇒ Object
52
53
54
|
# File 'lib/rmeetup/type/venue.rb', line 52
def rating
return self.venue['rating'].to_s
end
|
#rating_count ⇒ Object
49
50
51
|
# File 'lib/rmeetup/type/venue.rb', line 49
def rating_count
return self.venue['rating_count'].to_i
end
|
#state ⇒ Object
34
35
36
|
# File 'lib/rmeetup/type/venue.rb', line 34
def state
return self.venue['state'].to_s
end
|
#zip ⇒ Object
31
32
33
|
# File 'lib/rmeetup/type/venue.rb', line 31
def zip
return self.venue['zip'].to_s
end
|