Methods

Class Public methods

new(block)

📝 Source code
# File activesupport/lib/active_support/callbacks.rb, line 482
          def initialize(block)
            @override_block = block
          end
🔎 See on GitHub

Instance Public methods

expand(target, value, block)

📝 Source code
# File activesupport/lib/active_support/callbacks.rb, line 486
          def expand(target, value, block)
            raise ArgumentError unless block
            [target, @override_block || block, :instance_exec, target, block]
          end
🔎 See on GitHub

inverted_lambda()

📝 Source code
# File activesupport/lib/active_support/callbacks.rb, line 498
          def inverted_lambda
            lambda do |target, value, &block|
              raise ArgumentError unless block
              !target.instance_exec(target, block, &@override_block)
            end
          end
🔎 See on GitHub

make_lambda()

📝 Source code
# File activesupport/lib/active_support/callbacks.rb, line 491
          def make_lambda
            lambda do |target, value, &block|
              raise ArgumentError unless block
              target.instance_exec(target, block, &@override_block)
            end
          end
🔎 See on GitHub