Sha256: 84824a3ff74c39663126522c54db841eeb6ee5f943d89576e5f39216ed804af0

Contents?: true

Size: 749 Bytes

Versions: 4

Compression:

Stored size: 749 Bytes

Contents

module Mutant
  class Mutator
    class Node

      # Mutator for super with parantheses
      class Super < self
        handle(Rubinius::AST::Super)

      private

        # Emit mutations
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          emit_node(Rubinius::AST::ZSuper)
          emit_without_block
          emit_attribute_mutations(:block) if node.block
          emit_attribute_mutations(:arguments) 
        end

        # Emit without block mutation
        #
        # @return [undefined]
        #
        # @api private
        #
        def emit_without_block
          dup = dup_node
          dup.block = nil
          emit(dup)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mutant-0.2.20 lib/mutant/mutator/node/super.rb
mutant-0.2.17 lib/mutant/mutator/node/super.rb
mutant-0.2.16 lib/mutant/mutator/node/super.rb
mutant-0.2.15 lib/mutant/mutator/node/super.rb