free_mutant/lib/mutant/mutator/node/const.rb
Dan Kubb 345b67144a Add const mutator
* The const node has children, which need to be mutated
2013-07-23 21:57:39 -07:00

28 lines
517 B
Ruby

module Mutant
class Mutator
class Node
# Mutation emitter to handle const nodes
class Const < self
handle(:const)
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
emit_nil
children.each_with_index do |child, index|
mutate_child(index) if child.kind_of?(Parser::AST::Node)
end
end
end # Const
end # Node
end # Mutator
end # Mutant