Sha256: f1ba0068a3399509da6e638a2f6d19018952500497a38b42fb914e85dfbe198d

Contents?: true

Size: 833 Bytes

Versions: 6

Compression:

Stored size: 833 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
            mutation
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mutant-0.2.20 lib/mutant/mutator/node/formal_arguments_19.rb
mutant-0.2.17 lib/mutant/mutator/node/formal_arguments_19.rb
mutant-0.2.16 lib/mutant/mutator/node/formal_arguments_19.rb
mutant-0.2.15 lib/mutant/mutator/node/formal_arguments_19.rb
mutant-0.2.14 lib/mutant/mutator/node/formal_arguments_19.rb
mutant-0.2.13 lib/mutant/mutator/node/formal_arguments_19.rb