Class: Circuitry::Topic
- Inherits:
-
Object
- Object
- Circuitry::Topic
- Defined in:
- lib/circuitry/topic.rb
Instance Attribute Summary collapse
-
#arn ⇒ Object
readonly
Returns the value of attribute arn.
Instance Method Summary collapse
- #==(obj) ⇒ Object
- #hash ⇒ Object
-
#initialize(arn) ⇒ Topic
constructor
A new instance of Topic.
- #name ⇒ Object
Constructor Details
#initialize(arn) ⇒ Topic
Returns a new instance of Topic.
5 6 7 |
# File 'lib/circuitry/topic.rb', line 5 def initialize(arn) @arn = arn end |
Instance Attribute Details
#arn ⇒ Object (readonly)
Returns the value of attribute arn.
3 4 5 |
# File 'lib/circuitry/topic.rb', line 3 def arn @arn end |
Instance Method Details
#==(obj) ⇒ Object
13 14 15 |
# File 'lib/circuitry/topic.rb', line 13 def ==(obj) obj.hash == self.hash end |
#hash ⇒ Object
17 18 19 |
# File 'lib/circuitry/topic.rb', line 17 def hash [self.class, arn].hash end |
#name ⇒ Object
9 10 11 |
# File 'lib/circuitry/topic.rb', line 9 def name @name ||= arn.split(':').last end |