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

35 lines
589 B
Ruby
Raw Normal View History

# encoding: utf-8
module Mutant
class Mutator
class Node
# Emitter for mutations on 19 blocks
class Block < self
handle(:block)
2013-06-21 15:05:48 +02:00
children :send, :arguments, :body
2013-06-14 20:19:53 +02:00
private
# Emit mutants
#
# @return [undefined]
#
# @api private
#
def dispatch
2013-06-21 15:05:48 +02:00
emit(send)
emit_arguments_mutations
if body
emit_body_mutations
end
emit_body(nil)
emit_body(RAISE)
end
end # Block
end # Node
end # Mutator
end # Mutant