Class: Leftovers::Processors::ReplaceValue
- Inherits:
-
Object
- Object
- Leftovers::Processors::ReplaceValue
- Includes:
- ComparableInstance
- Defined in:
- lib/leftovers/processors/replace_value.rb
Instance Method Summary collapse
-
#initialize(value, then_processor) ⇒ ReplaceValue
constructor
A new instance of ReplaceValue.
- #process(_str, current_node, matched_node, acc) ⇒ Object
Methods included from ComparableInstance
Constructor Details
#initialize(value, then_processor) ⇒ ReplaceValue
Returns a new instance of ReplaceValue.
8 9 10 11 12 13 |
# File 'lib/leftovers/processors/replace_value.rb', line 8 def initialize(value, then_processor) @value = value @then_processor = then_processor freeze end |
Instance Method Details
#process(_str, current_node, matched_node, acc) ⇒ Object
15 16 17 |
# File 'lib/leftovers/processors/replace_value.rb', line 15 def process(_str, current_node, matched_node, acc) @then_processor.process(@value, current_node, matched_node, acc) end |