Class: RailsEventStore::AsyncProxyStrategy::AfterCommit::AsyncRecord
- Inherits:
-
Object
- Object
- RailsEventStore::AsyncProxyStrategy::AfterCommit::AsyncRecord
- Defined in:
- lib/rails_event_store/active_job_dispatcher.rb
Instance Method Summary collapse
- #committed! ⇒ Object
-
#initialize(klass, event) ⇒ AsyncRecord
constructor
A new instance of AsyncRecord.
Constructor Details
#initialize(klass, event) ⇒ AsyncRecord
Returns a new instance of AsyncRecord.
19 20 21 22 |
# File 'lib/rails_event_store/active_job_dispatcher.rb', line 19 def initialize(klass, event) @klass = klass @event = event end |
Instance Method Details
#committed! ⇒ Object
24 25 26 |
# File 'lib/rails_event_store/active_job_dispatcher.rb', line 24 def committed! @klass.perform_later(YAML.dump(@event)) end |