Class: Circuitry::Topic
- Inherits:
-
Object
- Object
- Circuitry::Topic
- Defined in:
- lib/circuitry/topic.rb
Defined Under Namespace
Classes: Finder
Instance Attribute Summary collapse
-
#arn ⇒ Object
readonly
Returns the value of attribute arn.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ 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.
23 24 25 |
# File 'lib/circuitry/topic.rb', line 23 def initialize(arn) @arn = arn end |
Instance Attribute Details
#arn ⇒ Object (readonly)
Returns the value of attribute arn.
21 22 23 |
# File 'lib/circuitry/topic.rb', line 21 def arn @arn end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
35 36 37 |
# File 'lib/circuitry/topic.rb', line 35 def ==(other) other.hash == hash end |
#hash ⇒ Object
39 40 41 |
# File 'lib/circuitry/topic.rb', line 39 def hash [self.class, arn].hash end |
#name ⇒ Object
31 32 33 |
# File 'lib/circuitry/topic.rb', line 31 def name @name ||= arn.split(':').last end |