free_mutant/lib/mutant/mutator/node/block.rb
2013-06-21 15:07:40 +02:00

32 lines
567 B
Ruby

module Mutant
class Mutator
class Node
# Emitter for mutations on 19 blocks
class Block < self
handle(:block)
children :send, :arguments, :body
private
# Emit mutants
#
# @return [undefined]
#
# @api private
#
def dispatch
emit(send)
emit_arguments_mutations
if body
emit_body_mutations
else
emit_body(NEW_OBJECT)
end
end
end # Block
end # Node
end # Mutator
end # Mutant