Class: Maia::Topic
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(topic) ⇒ Topic
constructor
A new instance of Topic.
- #to_h ⇒ Object
- #to_s ⇒ Object
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_h ⇒ Object
17 18 19 |
# File 'lib/maia/topic.rb', line 17 def to_h { topic: @topic } end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/maia/topic.rb', line 13 def to_s @topic end |