Class: RMeetup::Type::Group
- Inherits:
-
Object
- Object
- RMeetup::Type::Group
show all
- Defined in:
- lib/rmeetup/type/group.rb
Overview
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(group = {}) ⇒ Group
Returns a new instance of Group.
17
18
19
|
# File 'lib/rmeetup/type/group.rb', line 17
def initialize(group = {})
self.group = group
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/group.rb', line 21
def method_missing(id, *args)
return self.group[id.id2name]
end
|
Instance Attribute Details
#group ⇒ Object
Returns the value of attribute group.
15
16
17
|
# File 'lib/rmeetup/type/group.rb', line 15
def group
@group
end
|
Instance Method Details
#created ⇒ Object
33
34
35
|
# File 'lib/rmeetup/type/group.rb', line 33
def created
return DateTime.parse(self.group['created'])
end
|
#daysleft ⇒ Object
42
43
44
|
# File 'lib/rmeetup/type/group.rb', line 42
def daysleft
return self.group['daysleft'].to_i
end
|
#id ⇒ Object
Special accessors that need typecasting or other parsing
27
28
29
|
# File 'lib/rmeetup/type/group.rb', line 27
def id
return self.group['id'].to_i
end
|
#lat ⇒ Object
36
37
38
|
# File 'lib/rmeetup/type/group.rb', line 36
def lat
return self.group['lat'].to_f
end
|
#lon ⇒ Object
39
40
41
|
# File 'lib/rmeetup/type/group.rb', line 39
def lon
return self.group['lon'].to_f
end
|
#updated ⇒ Object
30
31
32
|
# File 'lib/rmeetup/type/group.rb', line 30
def updated
return DateTime.parse(self.group['updated'])
end
|