Module: CarrierWave::Uploader::Callbacks::ClassMethods

Defined in:
lib/carrierwave/uploader/callbacks.rb

Instance Method Summary collapse

Instance Method Details

#after(kind, callback) ⇒ Object



27
28
29
30
# File 'lib/carrierwave/uploader/callbacks.rb', line 27

def after(kind, callback)
  self._after_callbacks = self._after_callbacks.
    merge kind => _after_callbacks[kind] + [callback]
end

#before(kind, callback) ⇒ Object



22
23
24
25
# File 'lib/carrierwave/uploader/callbacks.rb', line 22

def before(kind, callback)
  self._before_callbacks = self._before_callbacks.
    merge kind => _before_callbacks[kind] + [callback]
end