Class ActiveSupport::Callbacks::Callback
In: vendor/rails/activesupport/lib/active_support/callbacks.rb
Parent: Object

Methods

==   call   dup   eql?   hash   new  

Attributes

identifier  [R] 
kind  [R] 
method  [R] 
options  [R] 

Public Class methods

[Source]

     # 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

Public Instance methods

[Source]

     # 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

[Source]

     # 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

[Source]

     # File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 153
153:       def dup
154:         self.class.new(@kind, @method, @options.dup)
155:       end

[Source]

     # File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 149
149:       def eql?(other)
150:         self == other
151:       end

[Source]

     # File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 157
157:       def hash
158:         if @identifier
159:           @identifier.hash
160:         else
161:           @method.hash
162:         end
163:       end

[Validate]