free_mutant/lib/mutant/mutator/node/mlhs.rb

30 lines
531 B
Ruby
Raw Normal View History

# encoding: utf-8
2013-06-14 14:19:53 -04:00
module Mutant
class Mutator
class Node
2013-06-15 11:13:01 -04:00
# Mutator for multiple assignment left hand side nodes
2013-06-14 14:19:53 -04:00
class MLHS < self
handle(:mlhs)
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
children.each_index do |index|
mutate_child(index)
2013-12-07 13:03:17 -05:00
delete_child(index) unless children.one?
2013-06-14 14:19:53 -04:00
end
end
end # MLHS
end # Node
end # Mutator
end # Mutant