Class: MultipleMan::Subscribers::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/multiple_man/subscribers/registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRegistry

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

#subscriptionsObject (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