Sha256: c94e6e9dc37e7181ea8279a8a582efbc870d16b93657dfb8a550f8ccf72b7cb8

Contents?: true

Size: 895 Bytes

Versions: 2

Compression:

Stored size: 895 Bytes

Contents

module Mutant
  class Mutator
    class Node

      # Generic mutator
      class Generic < self

        # These nodes still need a dedicated mutator,
        # your contribution is that close!
        handle(
          :ensure, :redo, :regopt, :retry, :arg_expr,
          :kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty,
          :alias, :for, :xstr, :back_ref, :class,
          :sclass, :match_with_lvasgn, :while_post,
          :until_post, :preexe, :postexe, :iflipflop, :eflipflop, :kwsplat,
          :shadowarg
        )

      private

        # Emit mutations
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          children.each_with_index do |child, index|
            mutate_child(index) if child.is_a?(Parser::AST::Node)
          end
        end

      end # Generic
    end # Node
  end # Mutator
end # Mutant

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mutant-0.6.5 lib/mutant/mutator/node/generic.rb
mutant-0.6.4 lib/mutant/mutator/node/generic.rb