2013-07-28 16:03:06 -07:00
|
|
|
# encoding: utf-8
|
|
|
|
|
2012-12-10 17:11:08 +01:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Node
|
|
|
|
# Emitter for mutations on 19 blocks
|
2013-06-04 10:25:13 +02:00
|
|
|
class Block < self
|
2012-12-10 17:11:08 +01:00
|
|
|
|
2013-06-04 10:25:13 +02:00
|
|
|
handle(:block)
|
2012-12-10 17:11:08 +01:00
|
|
|
|
2013-06-21 15:05:48 +02:00
|
|
|
children :send, :arguments, :body
|
2013-06-14 20:19:53 +02:00
|
|
|
|
|
|
|
private
|
|
|
|
|
2012-12-10 17:11:08 +01:00
|
|
|
# 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
|
2013-07-05 03:02:45 +02:00
|
|
|
emit_body(nil)
|
2013-07-02 20:42:09 +02:00
|
|
|
emit_body(RAISE)
|
2012-12-10 17:11:08 +01:00
|
|
|
end
|
|
|
|
|
2013-06-04 10:25:13 +02:00
|
|
|
end # Block
|
|
|
|
end # Node
|
|
|
|
end # Mutator
|
|
|
|
end # Mutant
|