Class: RMeetup::Type::Topic
- Inherits:
-
Object
- Object
- RMeetup::Type::Topic
- Defined in:
- lib/rmeetup/type/topic.rb
Overview
RMeetup::Type::Topic
Data wraper for a Topic fethcing response Used to access result attributes as well as progammatically fetch relative data types based on this topic.
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#link ⇒ Object
Returns the value of attribute link.
-
#members ⇒ Object
Returns the value of attribute members.
-
#name ⇒ Object
Returns the value of attribute name.
-
#updated ⇒ Object
Returns the value of attribute updated.
-
#urlkey ⇒ Object
Returns the value of attribute urlkey.
Instance Method Summary collapse
-
#initialize(topic = {}) ⇒ Topic
constructor
A new instance of Topic.
Constructor Details
#initialize(topic = {}) ⇒ Topic
Returns a new instance of Topic.
13 14 15 16 17 18 19 20 21 |
# File 'lib/rmeetup/type/topic.rb', line 13 def initialize(topic = {}) self.name = topic['name'] self.urlkey = topic['urlkey'] self.id = topic['id'].to_i self.description = topic['description'] self.members = topic['members'].to_i self.link = topic['link'] self.updated = DateTime.parse(topic['updated']) end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
11 12 13 |
# File 'lib/rmeetup/type/topic.rb', line 11 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
11 12 13 |
# File 'lib/rmeetup/type/topic.rb', line 11 def id @id end |
#link ⇒ Object
Returns the value of attribute link.
11 12 13 |
# File 'lib/rmeetup/type/topic.rb', line 11 def link @link end |
#members ⇒ Object
Returns the value of attribute members.
11 12 13 |
# File 'lib/rmeetup/type/topic.rb', line 11 def members @members end |
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/rmeetup/type/topic.rb', line 11 def name @name end |
#updated ⇒ Object
Returns the value of attribute updated.
11 12 13 |
# File 'lib/rmeetup/type/topic.rb', line 11 def updated @updated end |
#urlkey ⇒ Object
Returns the value of attribute urlkey.
11 12 13 |
# File 'lib/rmeetup/type/topic.rb', line 11 def urlkey @urlkey end |