Class: Mutant::Mutator::Regexp::Replacement Private
- Inherits:
-
Mutant::Mutator::Regexp
- Object
- Mutant::Mutator
- Mutant::Mutator::Regexp
- Mutant::Mutator::Regexp::Replacement
- Defined in:
- lib/mutant/mutator/regexp.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- MAP =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
dual_table.flat_map do |(left_key, left_text, right_key, right_text)| [ [left_key, [right_key, right_text]], [right_key, [left_key, left_text]] ] end.to_h
Constants inherited from Mutant::Mutator::Regexp
Instance Attribute Summary
Attributes inherited from Mutant::Mutator
Instance Method Summary collapse
- #dispatch ⇒ Object private
Methods inherited from Mutant::Mutator::Regexp
Methods included from Procto
Instance Method Details
#dispatch ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
140 141 142 143 144 |
# File 'lib/mutant/mutator/regexp.rb', line 140 def dispatch klass, text = MAP.fetch(input.class) emit(klass.construct(text:).tap { |new| new.quantifier = input.quantifier }) end |