Class: Diggr::Topic

Inherits:
Object
  • Object
show all
Defined in:
lib/diggr/response_classes/topic.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/diggr/response_classes/topic.rb', line 6

def name
  @name
end

#short_nameObject

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