Class: RailsTransactionalOutbox::ReliableModel::ReliableCallbacksRegistry

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/rails_transactional_outbox/reliable_model/reliable_callbacks_registry.rb

Instance Method Summary collapse

Constructor Details

#initializeReliableCallbacksRegistry

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