Class: Diggr::Topic
- Inherits:
-
Object
- Object
- Diggr::Topic
- Defined in:
- lib/diggr/response_classes/topic.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#short_name ⇒ Object
Returns the value of attribute short_name.
Class Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/diggr/response_classes/topic.rb', line 6 def name @name end |
#short_name ⇒ Object
Returns the value of attribute short_name.
6 7 8 |
# File 'lib/diggr/response_classes/topic.rb', line 6 def short_name @short_name end |
Class Method Details
.new_from_parsed_json(data) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/diggr/response_classes/topic.rb', line 8 def self.new_from_parsed_json(data) topic = Topic.new topic.name = data['name'] topic.short_name = data['short_name'] topic end |