Class: RailsEventStore::AfterCommitAsyncDispatcher::AsyncRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_event_store/after_commit_async_dispatcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schedule_proc) ⇒ AsyncRecord

Returns a new instance of AsyncRecord.



32
33
34
# File 'lib/rails_event_store/after_commit_async_dispatcher.rb', line 32

def initialize(schedule_proc)
  @schedule_proc = schedule_proc
end

Instance Attribute Details

#schedule_procObject (readonly)

Returns the value of attribute schedule_proc.



49
50
51
# File 'lib/rails_event_store/after_commit_async_dispatcher.rb', line 49

def schedule_proc
  @schedule_proc
end

Instance Method Details

#before_committed!Object



43
44
# File 'lib/rails_event_store/after_commit_async_dispatcher.rb', line 43

def before_committed!
end

#committed!Object



36
37
38
# File 'lib/rails_event_store/after_commit_async_dispatcher.rb', line 36

def committed!(*)
  schedule_proc.call
end

#rolledback!Object



40
41
# File 'lib/rails_event_store/after_commit_async_dispatcher.rb', line 40

def rolledback!(*)
end

#trigger_transactional_callbacks?Boolean

Returns:

  • (Boolean)


46
47
# File 'lib/rails_event_store/after_commit_async_dispatcher.rb', line 46

def trigger_transactional_callbacks?
end