Class: RubyEventStore::PubSub::Dispatcher
- Inherits:
-
Object
- Object
- RubyEventStore::PubSub::Dispatcher
- Defined in:
- lib/ruby_event_store/pub_sub/dispatcher.rb
Instance Method Summary collapse
Instance Method Details
#call(subscriber, event) ⇒ Object
4 5 6 |
# File 'lib/ruby_event_store/pub_sub/dispatcher.rb', line 4 def call(subscriber, event) subscriber.call(event) end |
#proxy_for(klass) ⇒ Object
8 9 10 11 |
# File 'lib/ruby_event_store/pub_sub/dispatcher.rb', line 8 def proxy_for(klass) raise InvalidHandler.new(klass) unless klass.method_defined?(:call) ->(e) { klass.new.call(e) } end |