2012-12-10 11:11:08 -05:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Node
|
|
|
|
# Emitter for mutations on 19 blocks
|
2013-06-04 04:25:13 -04:00
|
|
|
class Block < self
|
2012-12-10 11:11:08 -05:00
|
|
|
|
2013-06-04 04:25:13 -04:00
|
|
|
handle(:block)
|
2012-12-10 11:11:08 -05:00
|
|
|
|
2013-06-21 09:05:48 -04:00
|
|
|
children :send, :arguments, :body
|
2013-06-14 14:19:53 -04:00
|
|
|
|
|
|
|
private
|
|
|
|
|
2012-12-10 11:11:08 -05:00
|
|
|
# Emit mutants
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
2013-06-21 09:05:48 -04:00
|
|
|
emit(send)
|
|
|
|
emit_arguments_mutations
|
|
|
|
if body
|
|
|
|
emit_body_mutations
|
|
|
|
else
|
|
|
|
emit_body(NEW_OBJECT)
|
|
|
|
end
|
2012-12-10 11:11:08 -05:00
|
|
|
end
|
|
|
|
|
2013-06-04 04:25:13 -04:00
|
|
|
end # Block
|
|
|
|
end # Node
|
|
|
|
end # Mutator
|
|
|
|
end # Mutant
|