Sha256: a8aae46b4c71061c618b9e20e6a09bcd9937cbade2ca65b0646c998c0103280a

Contents?: true

Size: 864 Bytes

Versions: 26

Compression:

Stored size: 864 Bytes

Contents

module Mutant
  class Mutator
    class Node
      module NamedValue

        # Mutation emitter to handle constant assignment nodes
        class ConstantAssignment < Node

          children :cbase, :name, :value

          handle :casgn

        private

          # Perform dispatch
          #
          # @return [undefined]
          #
          # @api private
          #
          def dispatch
            mutate_name
            emit_value_mutations if value
          end

          # Emit name mutations
          #
          # @return [undefined]
          #
          # @api private
          #
          def mutate_name
            Mutator::Util::Symbol.each(name, self) do |name|
              emit_name(name.upcase)
            end
          end

        end # ConstantAssignment
      end # NamedValue
    end # Node
  end # Mutator
end # Mutant

Version data entries

26 entries across 26 versions & 1 rubygems

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