Class: Leftovers::Processors::Each
- Inherits:
-
Object
- Object
- Leftovers::Processors::Each
- Includes:
- ComparableInstance
- Defined in:
- lib/leftovers/processors/each.rb
Instance Attribute Summary collapse
-
#processors ⇒ Object
readonly
Returns the value of attribute processors.
Instance Method Summary collapse
-
#initialize(processors) ⇒ Each
constructor
A new instance of Each.
- #process(str, current_node, matched_node, acc) ⇒ Object
Methods included from ComparableInstance
Constructor Details
#initialize(processors) ⇒ Each
Returns a new instance of Each.
10 11 12 13 14 |
# File 'lib/leftovers/processors/each.rb', line 10 def initialize(processors) @processors = processors freeze end |
Instance Attribute Details
#processors ⇒ Object (readonly)
Returns the value of attribute processors.
8 9 10 |
# File 'lib/leftovers/processors/each.rb', line 8 def processors @processors end |
Instance Method Details
#process(str, current_node, matched_node, acc) ⇒ Object
16 17 18 19 20 |
# File 'lib/leftovers/processors/each.rb', line 16 def process(str, current_node, matched_node, acc) @processors.each do |processor| processor.process(str, current_node, matched_node, acc) end end |