Skip to Content Skip to Search
Methods
E
I
M
N

Class Public methods

new(target, method)

# File activesupport/lib/active_support/callbacks.rb, line 412
def initialize(target, method)
  @override_target = target
  @method_name = method
end

Instance Public methods

expand(target, value, block)

# File activesupport/lib/active_support/callbacks.rb, line 417
def expand(target, value, block)
  [@override_target || target, block, @method_name, target]
end

inverted_lambda()

# File activesupport/lib/active_support/callbacks.rb, line 427
def inverted_lambda
  lambda do |target, value, &block|
    !(@override_target || target).send(@method_name, target, &block)
  end
end

make_lambda()

# File activesupport/lib/active_support/callbacks.rb, line 421
def make_lambda
  lambda do |target, value, &block|
    (@override_target || target).send(@method_name, target, &block)
  end
end