Class: SimpleEventSourcing::Events::EventSubscriber
- Inherits:
-
Object
- Object
- SimpleEventSourcing::Events::EventSubscriber
- Defined in:
- lib/simple_event_sourcing/events/event_subscriber.rb
Instance Method Summary collapse
- #check(event) ⇒ Object
- #handle(event) ⇒ Object
- #handle_event(event) ⇒ Object
- #is_subscribet_to?(event) ⇒ Boolean
Instance Method Details
#check(event) ⇒ Object
9 10 11 |
# File 'lib/simple_event_sourcing/events/event_subscriber.rb', line 9 def check(event) raise EventIsNotAllowedToBeHandled unless is_subscribet_to? event end |
#handle(event) ⇒ Object
17 18 19 20 |
# File 'lib/simple_event_sourcing/events/event_subscriber.rb', line 17 def handle(event) check event handle_event event end |
#handle_event(event) ⇒ Object
13 14 15 |
# File 'lib/simple_event_sourcing/events/event_subscriber.rb', line 13 def handle_event(event) raise StandardError "Method not implemented" end |
#is_subscribet_to?(event) ⇒ Boolean
5 6 7 |
# File 'lib/simple_event_sourcing/events/event_subscriber.rb', line 5 def is_subscribet_to?(event) raise StandardError "Method not implemented" end |