Class: Traject::Indexer::AfterProcessingStep
- Inherits:
-
Object
- Object
- Traject::Indexer::AfterProcessingStep
- Defined in:
- lib/traject/indexer.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
Constructor Details
#initialize(lambda, block, source_location) ⇒ AfterProcessingStep
Returns a new instance of AfterProcessingStep.
576 577 578 579 580 |
# File 'lib/traject/indexer.rb', line 576 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.
575 576 577 |
# File 'lib/traject/indexer.rb', line 575 def block @block end |
#lambda ⇒ Object
Returns the value of attribute lambda.
575 576 577 |
# File 'lib/traject/indexer.rb', line 575 def lambda @lambda end |
#source_location ⇒ Object
Returns the value of attribute source_location.
575 576 577 |
# File 'lib/traject/indexer.rb', line 575 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.
584 585 586 587 588 589 |
# File 'lib/traject/indexer.rb', line 584 def execute [lambda, block].each do |aProc| next unless aProc aProc.call end end |
#inspect ⇒ Object
591 592 593 |
# File 'lib/traject/indexer.rb', line 591 def inspect "(after_processing at #{self.source_location}" end |