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

30 lines
475 B
Ruby
Raw Normal View History

2013-11-03 20:35:39 -08:00
# encoding: utf-8
module Mutant
class Mutator
class Node
# Mutator for loop control keywords
class Break < Generic
2013-11-03 20:35:39 -08:00
handle(:break)
2013-11-03 20:35:39 -08:00
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
super
emit_singletons
2013-11-03 20:35:39 -08:00
children.each_index(&method(:delete_child))
end
end # Break
2013-11-03 20:35:39 -08:00
end # Node
end # Mutator
end # Mutant