Class: Diggr::Topic
- Inherits:
-
Object
- Object
- Diggr::Topic
- Defined in:
- lib/diggr/response_classes/topic.rb
Instance Attribute Summary collapse
-
#container ⇒ Object
Returns the value of attribute container.
-
#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
#container ⇒ Object
Returns the value of attribute container.
7 8 9 |
# File 'lib/diggr/response_classes/topic.rb', line 7 def container @container end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/diggr/response_classes/topic.rb', line 7 def name @name end |
#short_name ⇒ Object
Returns the value of attribute short_name.
7 8 9 |
# File 'lib/diggr/response_classes/topic.rb', line 7 def short_name @short_name end |
Class Method Details
.new_from_parsed_json(data) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/diggr/response_classes/topic.rb', line 9 def self.new_from_parsed_json(data) topic = Topic.new topic.name = data['name'] topic.short_name = data['short_name'] if data.has_key? 'container' topic.container = Diggr::Container.new_from_parsed_json(data['container']) end topic end |