Class: RailsTransactionalOutbox::ReliableModel::ReliableCallbacksRegistry
- Inherits:
-
Object
- Object
- RailsTransactionalOutbox::ReliableModel::ReliableCallbacksRegistry
- Includes:
- Enumerable
- Defined in:
- lib/rails_transactional_outbox/reliable_model/reliable_callbacks_registry.rb
Instance Method Summary collapse
- #<<(item) ⇒ Object
- #for_event_type(event_type) ⇒ Object
-
#initialize ⇒ ReliableCallbacksRegistry
constructor
A new instance of ReliableCallbacksRegistry.
Constructor Details
#initialize ⇒ ReliableCallbacksRegistry
Returns a new instance of ReliableCallbacksRegistry.
13 14 15 |
# File 'lib/rails_transactional_outbox/reliable_model/reliable_callbacks_registry.rb', line 13 def initialize @registry = [] end |
Instance Method Details
#<<(item) ⇒ Object
17 18 19 |
# File 'lib/rails_transactional_outbox/reliable_model/reliable_callbacks_registry.rb', line 17 def <<(item) registry << item end |
#for_event_type(event_type) ⇒ Object
21 22 23 |
# File 'lib/rails_transactional_outbox/reliable_model/reliable_callbacks_registry.rb', line 21 def for_event_type(event_type) registry.select { |cb| cb.for_event?(event_type) } end |