Class: Ephemeron::Callbacks
- Inherits:
-
ThreadStore
- Object
- ActiveSupport::CurrentAttributes
- ThreadStore
- Ephemeron::Callbacks
- Defined in:
- lib/ephemeron/writers/callbacks.rb
Instance Method Summary collapse
Instance Method Details
#add(callback) ⇒ Object
11 12 13 |
# File 'lib/ephemeron/writers/callbacks.rb', line 11 def add(callback) after_save_callbacks << callback end |
#after_save_callbacks ⇒ Object
7 8 9 |
# File 'lib/ephemeron/writers/callbacks.rb', line 7 def after_save_callbacks self.ts_after_save_callbacks ||= [] end |
#call ⇒ Object
15 16 17 |
# File 'lib/ephemeron/writers/callbacks.rb', line 15 def call after_save_callbacks.each(&:call) end |
#reset ⇒ Object
19 20 21 |
# File 'lib/ephemeron/writers/callbacks.rb', line 19 def reset self.ts_after_save_callbacks = [] end |