Sha256: 7697ba520d4bf411aa18114d894a831ba33cace2c0676a011b2d1b07e70fe7c0

Contents?: true

Size: 1.01 KB

Versions: 7

Compression:

Stored size: 1.01 KB

Contents

# encoding: utf-8

module Mutant
  class Mutator
    class Node
      class Send

        # Mutator for sends that correspond to an attribute assignment
        class AttributeAssignment < self

        private

          # Emit mutations
          #
          # @return [undefined]
          #
          # @api private
          #
          def dispatch
            normal_dispatch
            emit_attribute_read
          end

          # Mutate arguments
          #
          # @return [undefined]
          #
          # @api private
          #
          def mutate_arguments
            remaining_children_indices.each do |index|
              mutate_child(index)
            end
          end

          # Emit attribute read
          #
          # @return [undefined]
          #
          # @api private
          #
          def emit_attribute_read
            emit_self(receiver, selector.to_s[0..-2].to_sym)
          end

        end # AttributeAssignment

      end # Send
    end # Node
  end # Mutator
end # Mutant

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mutant-0.5.17 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.5.16 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.5.15 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.5.14 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.5.13 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.5.12 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.5.11 lib/mutant/mutator/node/send/attribute_assignment.rb