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

30 lines
466 B
Ruby
Raw Normal View History

2013-08-05 01:17:55 -04:00
# encoding: utf-8
2013-08-02 19:36:13 -04:00
module Mutant
class Mutator
class Node
# Mutator for nth-ref nodes
class NthRef < self
handle :nth_ref
children :number
private
# Perform dispatch
#
# @return [undefined]
#
# @api private
#
def dispatch
emit_number(number - 1)
emit_number(number + 1)
end
end # NthRef
end # Node
end # Mutator
end # Mutant