Class: ActiveSupport::Callbacks::CallTemplate::ObjectCall
- Defined in:
 - lib/active_support/callbacks.rb
 
Instance Method Summary collapse
- #expand(target, value, block) ⇒ Object
 - 
  
    
      #initialize(target, method)  ⇒ ObjectCall 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of ObjectCall.
 - #inverted_lambda ⇒ Object
 - #make_lambda ⇒ Object
 
Constructor Details
#initialize(target, method) ⇒ ObjectCall
Returns a new instance of ObjectCall.
      374 375 376 377  | 
    
      # File 'lib/active_support/callbacks.rb', line 374 def initialize(target, method) @override_target = target @method_name = method end  | 
  
Instance Method Details
#expand(target, value, block) ⇒ Object
      379 380 381  | 
    
      # File 'lib/active_support/callbacks.rb', line 379 def (target, value, block) [@override_target || target, block, @method_name, target] end  | 
  
#inverted_lambda ⇒ Object
      389 390 391 392 393  | 
    
      # File 'lib/active_support/callbacks.rb', line 389 def inverted_lambda lambda do |target, value, &block| !(@override_target || target).send(@method_name, target, &block) end end  | 
  
#make_lambda ⇒ Object
      383 384 385 386 387  | 
    
      # File 'lib/active_support/callbacks.rb', line 383 def make_lambda lambda do |target, value, &block| (@override_target || target).send(@method_name, target, &block) end end  |