Class: Mutiny::Mutants::Mutation::Method::Helpers::OperatorReplacement
- Inherits:
-
Mutiny::Mutants::Mutation
- Object
- Mutiny::Mutants::Mutation
- Mutiny::Mutants::Mutation::Method::Helpers::OperatorReplacement
- Defined in:
- lib/mutiny/mutants/mutation/method/helpers/operator_replacement.rb
Direct Known Subclasses
ConditionalOperatorReplacement, InfixOperatorReplacement, ShortcutAssignmentOperatorReplacement
Defined Under Namespace
Classes: InfixOperator, PrefixOperator
Instance Method Summary collapse
Methods inherited from Mutiny::Mutants::Mutation
Instance Method Details
#pattern ⇒ Object
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 |
#replacement ⇒ Object
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 |