free_mutant/lib/mutant/mutator/node/next.rb
2013-11-03 20:35:39 -08:00

30 lines
481 B
Ruby

# encoding: utf-8
module Mutant
class Mutator
class Node
# Next mutator
class Next < Generic
handle(:next)
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
super
children.each_index(&method(:delete_child))
emit(s(:break, *children))
emit_nil
end
end # Next
end # Node
end # Mutator
end # Mutant