Class: Mutant::Mutation::Operators Private
- Inherits:
-
Object
- Object
- Mutant::Mutation::Operators
- Defined in:
- lib/mutant/mutation/operators.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.
Defined Under Namespace
Constant Summary collapse
- TRANSFORM =
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.
Transform::Sequence.new( steps: [ Transform::STRING, Transform::Block.capture('parse operator', &method(:parse)) ] )
Class Method Summary collapse
- .operators_name ⇒ Object private
- .parse(value) ⇒ Object private
Instance Method Summary collapse
- #selector_replacements ⇒ Object private
Class Method Details
.operators_name ⇒ 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.
66 67 68 |
# File 'lib/mutant/mutation/operators.rb', line 66 def self.operators_name self::NAME end |
.parse(value) ⇒ 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.
74 75 76 77 78 79 80 81 82 |
# File 'lib/mutant/mutation/operators.rb', line 74 def self.parse(value) klass = [Light, Full].detect { |candidate| candidate.operators_name.to_s.eql?(value) } if klass Either::Right.new(klass.new) else Either::Left.new("Unknown operators: #{value}") end end |
Instance Method Details
#selector_replacements ⇒ 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.
70 71 72 |
# File 'lib/mutant/mutation/operators.rb', line 70 def selector_replacements self.class::SELECTOR_REPLACEMENTS end |