Class: Evilution::Mutator::Operator::CompoundAssignment Private

Inherits:
Base
  • Object
show all
Defined in:
lib/evilution/mutator/operator/compound_assignment.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.

Constant Summary collapse

REPLACEMENTS =

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.

{
  :+ => %i[- *],
  :- => [:+],
  :* => [:/],
  :/ => [:*],
  :% => [:*],
  :** => [:*],
  :& => %i[| ^],
  :| => [:&],
  :^ => [:&],
  :<< => [:>>],
  :>> => [:<<]
}.freeze

Instance Attribute Summary

Attributes inherited from Base

#mutations

Instance Method Summary collapse

Methods inherited from Base

#call, clear_parse_cache!, #initialize, operator_name, parsed_tree_for

Constructor Details

This class inherits a constructor from Evilution::Mutator::Base

Instance Method Details

#visit_class_variable_and_write_node(node) ⇒ 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.



60
61
62
63
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 60

def visit_class_variable_and_write_node(node)
  mutate_logical_write(node, "||=")
  super
end

#visit_class_variable_operator_write_node(node) ⇒ 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.



30
31
32
33
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 30

def visit_class_variable_operator_write_node(node)
  mutate_operator_write(node)
  super
end

#visit_class_variable_or_write_node(node) ⇒ 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.



65
66
67
68
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 65

def visit_class_variable_or_write_node(node)
  mutate_logical_write(node, "&&=")
  super
end

#visit_global_variable_and_write_node(node) ⇒ 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
73
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 70

def visit_global_variable_and_write_node(node)
  mutate_logical_write(node, "||=")
  super
end

#visit_global_variable_operator_write_node(node) ⇒ 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.



35
36
37
38
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 35

def visit_global_variable_operator_write_node(node)
  mutate_operator_write(node)
  super
end

#visit_global_variable_or_write_node(node) ⇒ 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.



75
76
77
78
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 75

def visit_global_variable_or_write_node(node)
  mutate_logical_write(node, "&&=")
  super
end

#visit_instance_variable_and_write_node(node) ⇒ 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.



50
51
52
53
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 50

def visit_instance_variable_and_write_node(node)
  mutate_logical_write(node, "||=")
  super
end

#visit_instance_variable_operator_write_node(node) ⇒ 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.



25
26
27
28
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 25

def visit_instance_variable_operator_write_node(node)
  mutate_operator_write(node)
  super
end

#visit_instance_variable_or_write_node(node) ⇒ 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.



55
56
57
58
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 55

def visit_instance_variable_or_write_node(node)
  mutate_logical_write(node, "&&=")
  super
end

#visit_local_variable_and_write_node(node) ⇒ 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.



40
41
42
43
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 40

def visit_local_variable_and_write_node(node)
  mutate_logical_write(node, "||=")
  super
end

#visit_local_variable_operator_write_node(node) ⇒ 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.



20
21
22
23
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 20

def visit_local_variable_operator_write_node(node)
  mutate_operator_write(node)
  super
end

#visit_local_variable_or_write_node(node) ⇒ 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.



45
46
47
48
# File 'lib/evilution/mutator/operator/compound_assignment.rb', line 45

def visit_local_variable_or_write_node(node)
  mutate_logical_write(node, "&&=")
  super
end