Class: SimplePublisher::Topic
- Inherits:
-
Object
- Object
- SimplePublisher::Topic
- Defined in:
- lib/simple_publisher/topic.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(attributes = {}) ⇒ Topic
constructor
A new instance of Topic.
Constructor Details
#initialize(attributes = {}) ⇒ Topic
Returns a new instance of Topic.
5 6 7 8 9 |
# File 'lib/simple_publisher/topic.rb', line 5 def initialize(attributes = {}) attributes.each do |attr, value| send("#{attr}=", value) end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/simple_publisher/topic.rb', line 3 def name @name end |
Instance Method Details
#==(other) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/simple_publisher/topic.rb', line 11 def ==(other) case other when Topic other.name == self.name else false end end |