Methods

Class Public methods

new(target)

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

Instance Public methods

expand(target, value, block)

📝 Source code
# File activesupport/lib/active_support/callbacks.rb, line 511
          def expand(target, value, block)
            [@override_target || target, block, :call, target, value]
          end
🔎 See on GitHub

inverted_lambda()

📝 Source code
# File activesupport/lib/active_support/callbacks.rb, line 521
          def inverted_lambda
            lambda do |target, value, &block|
              !(@override_target || target).call(target, value, &block)
            end
          end
🔎 See on GitHub

make_lambda()

📝 Source code
# File activesupport/lib/active_support/callbacks.rb, line 515
          def make_lambda
            lambda do |target, value, &block|
              (@override_target || target).call(target, value, &block)
            end
          end
🔎 See on GitHub