Sha256: f7e00cfd7eeec5b6f4792a6e0740c4e1b87610c27b3957a5fb545f726839491d

Contents?: true

Size: 745 Bytes

Versions: 5

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

module Mutant
  class Mutator
    class Node
      class Send
        # Mutator for attribute assignments
        class AttributeAssignment < self

          ATTRIBUTE_RANGE = (0..-2).freeze
          private_constant(*constants(false))

        private

          def dispatch
            normal_dispatch
            emit_attribute_read
          end

          def mutate_arguments
            remaining_children_indices.each do |index|
              mutate_child(index)
            end
          end

          def emit_attribute_read
            emit_type(receiver, selector[ATTRIBUTE_RANGE].to_sym)
          end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mutant-0.9.13 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.9.12 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.9.11 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.9.10 lib/mutant/mutator/node/send/attribute_assignment.rb
mutant-0.9.9 lib/mutant/mutator/node/send/attribute_assignment.rb