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.



56
57
58
# File 'lib/mutant/mutation/operators.rb', line 56

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.



64
65
66
67
68
69
70
71
72
# File 'lib/mutant/mutation/operators.rb', line 64

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.



60
61
62
# File 'lib/mutant/mutation/operators.rb', line 60

def selector_replacements
  self.class::SELECTOR_REPLACEMENTS
end