free_mutant/lib/mutant/mutator/node/block.rb
2014-06-16 10:56:27 +00:00

33 lines
598 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_singletons
emit(send)
emit_arguments_mutations
if body
emit_body_mutations
end
emit_body(nil)
emit_body(N_RAISE)
end
end # Block
end # Node
end # Mutator
end # Mutant