跳至內容 跳至搜尋
方法
E
I
M
N

類別公開方法

new(區塊)

# File activesupport/lib/active_support/callbacks.rb, line 438
def initialize(block)
  @override_block = block
end

實例公開方法

expand(目標、值、區塊)

# File activesupport/lib/active_support/callbacks.rb, line 442
def expand(target, value, block)
  [target, @override_block, :instance_exec]
end

inverted_lambda()

# File activesupport/lib/active_support/callbacks.rb, line 452
def inverted_lambda
  lambda do |target, value, &block|
    !target.instance_exec(&@override_block)
  end
end

make_lambda()

# File activesupport/lib/active_support/callbacks.rb, line 446
def make_lambda
  lambda do |target, value, &block|
    target.instance_exec(&@override_block)
  end
end