Class: Traject::Indexer::AfterProcessingStep
- Inherits:
- 
      Object
      
        - Object
- Traject::Indexer::AfterProcessingStep
 
- Defined in:
- lib/traject/indexer/step.rb
Overview
A class representing a block of logic called after processing, registered with #after_processing
Instance Attribute Summary collapse
- 
  
    
      #block  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute block. 
- 
  
    
      #lambda  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute lambda. 
- 
  
    
      #source_location  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute source_location. 
Instance Method Summary collapse
- 
  
    
      #execute  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    after_processing steps get no args yielded to their blocks, they just are what they are. 
- 
  
    
      #initialize(lambda, block, source_location)  ⇒ AfterProcessingStep 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of AfterProcessingStep. 
- #inspect ⇒ Object
- #to_field_step? ⇒ Boolean
Constructor Details
#initialize(lambda, block, source_location) ⇒ AfterProcessingStep
Returns a new instance of AfterProcessingStep.
| 170 171 172 173 174 | # File 'lib/traject/indexer/step.rb', line 170 def initialize(lambda, block, source_location) self.lambda = lambda self.block = block self.source_location = source_location end | 
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
| 168 169 170 | # File 'lib/traject/indexer/step.rb', line 168 def block @block end | 
#lambda ⇒ Object
Returns the value of attribute lambda.
| 168 169 170 | # File 'lib/traject/indexer/step.rb', line 168 def lambda @lambda end | 
#source_location ⇒ Object
Returns the value of attribute source_location.
| 168 169 170 | # File 'lib/traject/indexer/step.rb', line 168 def source_location @source_location end | 
Instance Method Details
#execute ⇒ Object
after_processing steps get no args yielded to their blocks, they just are what they are.
| 183 184 185 186 | # File 'lib/traject/indexer/step.rb', line 183 def execute @block.call if @block @lambda.call if @lambda end | 
#inspect ⇒ Object
| 188 189 190 | # File 'lib/traject/indexer/step.rb', line 188 def inspect "(after_processing at #{self.source_location}" end | 
#to_field_step? ⇒ Boolean
| 177 178 179 | # File 'lib/traject/indexer/step.rb', line 177 def to_field_step? false end |