Class: Processor::EventsRegistrator
- Inherits:
-
Object
- Object
- Processor::EventsRegistrator
- Defined in:
- lib/processor/events_registrator.rb
Instance Method Summary collapse
-
#initialize(observers) ⇒ EventsRegistrator
constructor
A new instance of EventsRegistrator.
- #register(event, *data) ⇒ Object
Constructor Details
#initialize(observers) ⇒ EventsRegistrator
Returns a new instance of EventsRegistrator.
3 4 5 |
# File 'lib/processor/events_registrator.rb', line 3 def initialize(observers) @observers = observers end |
Instance Method Details
#register(event, *data) ⇒ Object
7 8 9 10 11 |
# File 'lib/processor/events_registrator.rb', line 7 def register(event, *data) observers.each do |observer| observer.update event, *data end end |