Class: Maia::Topic

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/maia/topic.rb

Instance Method Summary collapse

Constructor Details

#initialize(topic) ⇒ Topic

Returns a new instance of Topic.



5
6
7
# File 'lib/maia/topic.rb', line 5

def initialize(topic)
  @topic = topic
end

Instance Method Details

#each(&block) ⇒ Object



9
10
11
# File 'lib/maia/topic.rb', line 9

def each(&block)
  [self].each(&block)
end

#to_hObject



17
18
19
# File 'lib/maia/topic.rb', line 17

def to_h
  { topic: @topic }
end

#to_sObject



13
14
15
# File 'lib/maia/topic.rb', line 13

def to_s
  @topic
end