Sha256: 834a160463e89d30baf9aeacf44cc10263c9a882873e10eab98b8e9775e723a1

Contents?: true

Size: 978 Bytes

Versions: 11

Compression:

Stored size: 978 Bytes

Contents

# encoding: utf-8

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,
          :rescue, :redo, :defined?,
          :regopt, :retry, :arg_expr,
          :kwrestarg, :kwoptarg, :kwarg, :undef, :module, :empty,
          :alias, :for, :xstr, :back_ref, :class,
          :sclass, :match_with_lvasgn, :match_current_line, :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.kind_of?(Parser::AST::Node)
          end
        end

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mutant-0.5.6 lib/mutant/mutator/node/generic.rb
mutant-0.5.5 lib/mutant/mutator/node/generic.rb
mutant-0.5.4 lib/mutant/mutator/node/generic.rb
mutant-0.5.3 lib/mutant/mutator/node/generic.rb
mutant-0.5.2 lib/mutant/mutator/node/generic.rb
mutant-0.5.1 lib/mutant/mutator/node/generic.rb
mutant-0.5.0 lib/mutant/mutator/node/generic.rb
mutant-0.3.6 lib/mutant/mutator/node/generic.rb
mutant-0.3.5 lib/mutant/mutator/node/generic.rb
mutant-0.3.4 lib/mutant/mutator/node/generic.rb
mutant-0.3.3 lib/mutant/mutator/node/generic.rb