Module: CarrierWave::Uploader::Callbacks

Extended by:
ActiveSupport::Concern
Included in:
Base, Cache, Download, Processing, Remove, Store, Versions
Defined in:
lib/carrierwave/uploader/callbacks.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#with_callbacks(kind, *args) ⇒ Object



15
16
17
18
19
# File 'lib/carrierwave/uploader/callbacks.rb', line 15

def with_callbacks(kind, *args)
  self.class._before_callbacks[kind].each { |c| send c, *args }
  yield
  self.class._after_callbacks[kind].each { |c| send c, *args }
end