Class: RubySlime::EventDispatcher

Inherits:
Object
  • Object
show all
Includes:
Internals::EventMetadataHandler
Defined in:
lib/ruby_slime/event_dispatcher.rb

Direct Known Subclasses

EventQueue

Instance Method Summary collapse

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