Class: Mutant::Mutator::Regexp::Registry Private
- Inherits:
-
Object
- Object
- Mutant::Mutator::Regexp::Registry
- 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.
Instance Method Summary collapse
-
#initialize ⇒ Registry
constructor
private
A new instance of Registry.
- #lookup(expression_class) ⇒ Object private
- #register(expression_class, mutator_class) ⇒ Object private
Constructor Details
#initialize ⇒ Registry
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.
Returns a new instance of Registry.
18 19 20 |
# File 'lib/mutant/mutator/regexp.rb', line 18 def initialize super(contents: {}) end |
Instance Method Details
#lookup(expression_class) ⇒ 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.
27 28 29 |
# File 'lib/mutant/mutator/regexp.rb', line 27 def lookup(expression_class) contents.fetch(expression_class, []).push(Quantifier) end |
#register(expression_class, mutator_class) ⇒ 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.
22 23 24 25 |
# File 'lib/mutant/mutator/regexp.rb', line 22 def register(expression_class, mutator_class) (contents[expression_class] ||= []) << mutator_class self end |