Sha256: 3be87dba994ea29b1314ccb605b3292eeae0d019d08312a5b3a43aa12f1b1d26

Contents?: true

Size: 497 Bytes

Versions: 24

Compression:

Stored size: 497 Bytes

Contents

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
          unless number.equal?(1)
            emit_number(number - 1)
          end
          emit_number(number + 1)
        end

      end # NthRef
    end # Node
  end # Mutator
end # Mutant

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mutant-0.8.0 lib/mutant/mutator/node/nthref.rb
mutant-0.7.9 lib/mutant/mutator/node/nthref.rb
mutant-0.7.8 lib/mutant/mutator/node/nthref.rb
mutant-0.7.7 lib/mutant/mutator/node/nthref.rb
mutant-0.7.6 lib/mutant/mutator/node/nthref.rb
mutant-0.7.5 lib/mutant/mutator/node/nthref.rb
mutant-0.7.4 lib/mutant/mutator/node/nthref.rb
mutant-0.7.3 lib/mutant/mutator/node/nthref.rb
mutant-0.7.2 lib/mutant/mutator/node/nthref.rb
mutant-0.7.1 lib/mutant/mutator/node/nthref.rb
mutant-0.6.7 lib/mutant/mutator/node/nthref.rb
mutant-0.6.6 lib/mutant/mutator/node/nthref.rb
mutant-0.6.5 lib/mutant/mutator/node/nthref.rb
mutant-0.6.4 lib/mutant/mutator/node/nthref.rb
mutant-0.6.3 lib/mutant/mutator/node/nthref.rb
mutant-0.6.2 lib/mutant/mutator/node/nthref.rb
mutant-0.6.0 lib/mutant/mutator/node/nthref.rb
mutant-0.5.26 lib/mutant/mutator/node/nthref.rb
mutant-0.5.25 lib/mutant/mutator/node/nthref.rb
mutant-0.5.24 lib/mutant/mutator/node/nthref.rb