| 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 133
133: def initialize(kind, method, options = {})
134: @kind = kind
135: @method = method
136: @identifier = options[:identifier]
137: @options = options
138: end
# File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 140
140: def ==(other)
141: case other
142: when Callback
143: (self.identifier && self.identifier == other.identifier) || self.method == other.method
144: else
145: (self.identifier && self.identifier == other) || self.method == other
146: end
147: end
# File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 165
165: def call(*args, &block)
166: evaluate_method(method, *args, &block) if should_run_callback?(*args)
167: rescue LocalJumpError
168: raise ArgumentError,
169: "Cannot yield from a Proc type filter. The Proc must take two " +
170: "arguments and execute #call on the second argument."
171: end
# File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 153
153: def dup
154: self.class.new(@kind, @method, @options.dup)
155: end