class ActiveSupport::Callbacks::CallTemplate::InstanceExec1

Public Class Methods

new(block) click to toggle source
# File lib/active_support/callbacks.rb, line 457
def initialize(block)
  @override_block = block
end

Public Instance Methods

expand(target, value, block) click to toggle source
# File lib/active_support/callbacks.rb, line 461
def expand(target, value, block)
  [target, @override_block, :instance_exec, target]
end
inverted_lambda() click to toggle source
# File lib/active_support/callbacks.rb, line 471
def inverted_lambda
  lambda do |target, value, &block|
    !target.instance_exec(target, &@override_block)
  end
end
make_lambda() click to toggle source
# File lib/active_support/callbacks.rb, line 465
def make_lambda
  lambda do |target, value, &block|
    target.instance_exec(target, &@override_block)
  end
end