free_mutant/lib/mutant/mutator/block.rb
2012-08-13 20:40:00 +02:00

27 lines
451 B
Ruby

module Mutant
class Mutator
# Mutator on AST blocks
class Block < self
handle(Rubinius::AST::Block)
private
# Emit mutants
#
# @return [undefined]
#
# @api private
#
def dispatch
array = node.array
emit_elements(array)
if array.length > 1
emit_element_presence(array)
else
emit_self([new_nil])
end
end
end
end
end