module Praxis::Mapper::Resources::Callbacks::ClassMethods

Public Instance Methods

after(method, function = nil, &block) click to toggle source
# File lib/praxis/mapper/resources/callbacks.rb, line 22
def after(method, function = nil, &block)
  target = function ? function.to_sym : block
  after_callbacks[method] << target
end
around(method, function = nil, &block) click to toggle source
# File lib/praxis/mapper/resources/callbacks.rb, line 27
def around(method, function = nil, &block)
  target = function ? function.to_sym : block
  around_callbacks[method] << target
end
before(method, function = nil, &block) click to toggle source
# File lib/praxis/mapper/resources/callbacks.rb, line 17
def before(method, function = nil, &block)
  target = function ? function.to_sym : block
  before_callbacks[method] << target
end