Sha256: 8f9e32b092ebea8c0958fc9b3d2182b49377ef539cd630a797dd92446ec7850a

Contents?: true

Size: 616 Bytes

Versions: 7

Compression:

Stored size: 616 Bytes

Contents

module Mutant
  class Mutator
    class Node

      # Mutation emitter to handle const nodes
      class Const < self

        handle(:const)

      private

        # Emit mutations
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          emit_singletons unless parent_node && n_const?(parent_node)
          emit_type(nil, *children.drop(1))
          children.each_with_index do |child, index|
            mutate_child(index) if child.instance_of?(Parser::AST::Node)
          end
        end

      end # Const
    end # Node
  end # Mutator
end # Mutant

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mutant-0.8.0 lib/mutant/mutator/node/const.rb
mutant-0.7.9 lib/mutant/mutator/node/const.rb
mutant-0.7.8 lib/mutant/mutator/node/const.rb
mutant-0.7.7 lib/mutant/mutator/node/const.rb
mutant-0.7.6 lib/mutant/mutator/node/const.rb
mutant-0.7.5 lib/mutant/mutator/node/const.rb
mutant-0.7.4 lib/mutant/mutator/node/const.rb