Sha256: d649a6a11115edf9d811f7e39d4974de001b20581dfa250657879430a18f5cbf
Contents?: true
Size: 532 Bytes
Versions: 8
Compression:
Stored size: 532 Bytes
Contents
# frozen_string_literal: true module Leftovers module Processors class MatchCurrentNode include ComparableInstance attr_reader :matcher, :then_processor def initialize(matcher, then_processor) @matcher = matcher @then_processor = then_processor freeze end def process(str, current_node, matched_node, acc) return unless @matcher === current_node @then_processor.process(str, current_node, matched_node, acc) end freeze end end end
Version data entries
8 entries across 8 versions & 1 rubygems