Class: RailsTransactionalOutbox::OutboxEntriesProcessors::BaseProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_transactional_outbox/outbox_entries_processors/base_processor.rb

Instance Method Summary collapse

Constructor Details

#initialize(config: RailsTransactionalOutbox.configuration) ⇒ BaseProcessor

Returns a new instance of BaseProcessor.



9
10
11
# File 'lib/rails_transactional_outbox/outbox_entries_processors/base_processor.rb', line 9

def initialize(config: RailsTransactionalOutbox.configuration)
  @config = config
end

Instance Method Details

#callObject



13
14
15
16
17
# File 'lib/rails_transactional_outbox/outbox_entries_processors/base_processor.rb', line 13

def call(&)
  return [] unless outbox_model.any_records_to_process?

  execute(&)
end