free_mutant/lib/mutant/mutator/node/mlhs.rb
2013-12-07 19:03:17 +01:00

29 lines
531 B
Ruby

# encoding: utf-8
module Mutant
class Mutator
class Node
# Mutator for multiple assignment left hand side nodes
class MLHS < self
handle(:mlhs)
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
children.each_index do |index|
mutate_child(index)
delete_child(index) unless children.one?
end
end
end # MLHS
end # Node
end # Mutator
end # Mutant