Class: Mutiny::Mutants::Mutation::Method::Helpers::OperatorReplacement

Inherits:
Mutiny::Mutants::Mutation show all
Defined in:
lib/mutiny/mutants/mutation/method/helpers/operator_replacement.rb

Defined Under Namespace

Classes: InfixOperator, PrefixOperator

Instance Method Summary collapse

Methods inherited from Mutiny::Mutants::Mutation

#name, #short_name

Instance Method Details

#patternObject



9
10
11
12
13
# File 'lib/mutiny/mutants/mutation/method/helpers/operator_replacement.rb', line 9

def pattern
  builder.either!(
    *operators.map { |ot| ot.build_pattern(builder) }
  )
end

#replacementObject



15
16
17
18
19
# File 'lib/mutiny/mutants/mutation/method/helpers/operator_replacement.rb', line 15

def replacement
  builder.derivation! :left, :right, :& do |left, right, root|
    builder.either!(*mutations_for(left, operator_name_from(root), right))
  end
end