Class: Mutant::Mutation::Operators Private

Inherits:
Object
  • Object
show all
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.

Direct Known Subclasses

Full, Light

Defined Under Namespace

Classes: Full, Light

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

Instance Method Summary collapse

Class Method Details

.operators_nameObject

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.



170
171
172
# File 'lib/mutant/mutation/operators.rb', line 170

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.



176
177
178
179
180
181
182
183
184
# File 'lib/mutant/mutation/operators.rb', line 176

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_replacementsObject

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.



174
# File 'lib/mutant/mutation/operators.rb', line 174

def selector_replacements = self.class::SELECTOR_REPLACEMENTS