Class: RubySlime::EventDispatcher
- Inherits:
-
Object
- Object
- RubySlime::EventDispatcher
- Includes:
- Internals::EventMetadataHandler
- Defined in:
- lib/ruby_slime/event_dispatcher.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call(events, **metadata) ⇒ Object
-
#initialize(*handlers) ⇒ EventDispatcher
constructor
A new instance of EventDispatcher.
Constructor Details
#initialize(*handlers) ⇒ EventDispatcher
Returns a new instance of EventDispatcher.
7 8 9 10 |
# File 'lib/ruby_slime/event_dispatcher.rb', line 7 def initialize(*handlers) @handlers = handlers freeze end |
Instance Method Details
#call(events, **metadata) ⇒ Object
12 13 14 15 16 |
# File 'lib/ruby_slime/event_dispatcher.rb', line 12 def call(events, **) @handlers.each do |handler| handle_handler_arguments(handler, events, ) end end |