Sha256: dfd1e3358298e9080cd5923d2f5af17f2c7a2546b5173e0a1bb1748651bf8284

Contents?: true

Size: 812 Bytes

Versions: 4

Compression:

Stored size: 812 Bytes

Contents

module Mutant
  class Mutator
    class Node

      # Mutator for formal arguments in 1.9 mode
      class FormalArguments19 < self

      private

        handle(Rubinius::AST::FormalArguments19)

        # Emit mutations
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          run(DefaultMutations)
          run(RequireDefaults)
          run(PatternArgumentExpansion)
          emit_required_mutations
        end


        # Emit required mutations
        #
        # @return [undefined]
        #
        # @api private
        #
        def emit_required_mutations
          emit_attribute_mutations(:required) do |mutation|
            mutation.names = mutation.optional + mutation.required
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mutant-0.2.12 lib/mutant/mutator/node/formal_arguments_19.rb
mutant-0.2.11 lib/mutant/mutator/node/formal_arguments_19.rb
mutant-0.2.9 lib/mutant/mutator/node/formal_arguments_19.rb
mutant-0.2.8 lib/mutant/mutator/node/formal_arguments_19.rb