Class: MultipleMan::Subscribers::Registry
- Inherits:
-
Object
- Object
- MultipleMan::Subscribers::Registry
- Defined in:
- lib/multiple_man/subscribers/registry.rb
Instance Attribute Summary collapse
-
#subscriptions ⇒ Object
readonly
Returns the value of attribute subscriptions.
Instance Method Summary collapse
-
#initialize ⇒ Registry
constructor
A new instance of Registry.
- #register(subscription) ⇒ Object
Constructor Details
#initialize ⇒ Registry
Returns a new instance of Registry.
5 6 7 |
# File 'lib/multiple_man/subscribers/registry.rb', line 5 def initialize @subscriptions = [] end |
Instance Attribute Details
#subscriptions ⇒ Object (readonly)
Returns the value of attribute subscriptions.
3 4 5 |
# File 'lib/multiple_man/subscribers/registry.rb', line 3 def subscriptions @subscriptions end |
Instance Method Details
#register(subscription) ⇒ Object
9 10 11 |
# File 'lib/multiple_man/subscribers/registry.rb', line 9 def register(subscription) self.subscriptions << subscription end |