Sha256: bc07fbe4c20c1830a1b74e72fddb8fc9a090ce873dfbb5f34b690a2a16f77a2e

Contents?: true

Size: 609 Bytes

Versions: 7

Compression:

Stored size: 609 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.is_a?(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.7.3 lib/mutant/mutator/node/const.rb
mutant-0.7.2 lib/mutant/mutator/node/const.rb
mutant-0.7.1 lib/mutant/mutator/node/const.rb
mutant-0.6.7 lib/mutant/mutator/node/const.rb
mutant-0.6.6 lib/mutant/mutator/node/const.rb
mutant-0.6.5 lib/mutant/mutator/node/const.rb
mutant-0.6.4 lib/mutant/mutator/node/const.rb