Class | ActiveSupport::Callbacks::Callback |
In: |
vendor/rails/activesupport/lib/active_support/callbacks.rb
|
Parent: | Object |
identifier | [R] | |
kind | [R] | |
method | [R] | |
options | [R] |
# File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 136 136: def initialize(kind, method, options = {}) 137: @kind = kind 138: @method = method 139: @identifier = options[:identifier] 140: @options = options 141: end
# File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 143 143: def ==(other) 144: case other 145: when Callback 146: (self.identifier && self.identifier == other.identifier) || self.method == other.method 147: else 148: (self.identifier && self.identifier == other) || self.method == other 149: end 150: end
# File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 160 160: def call(*args, &block) 161: evaluate_method(method, *args, &block) if should_run_callback?(*args) 162: rescue LocalJumpError 163: raise ArgumentError, 164: "Cannot yield from a Proc type filter. The Proc must take two " + 165: "arguments and execute #call on the second argument." 166: end
# File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 156 156: def dup 157: self.class.new(@kind, @method, @options.dup) 158: end