Sha256: 73267d14c4adccecefa44ac50140625aeff25f821a7ec3011a43f585453c816b

Contents?: true

Size: 819 Bytes

Versions: 46

Compression:

Stored size: 819 Bytes

Contents

# frozen_string_literal: true

module Mutant
  # Namespace for mutant metadata
  module Meta
    require 'mutant/meta/example'
    require 'mutant/meta/example/dsl'
    require 'mutant/meta/example/verification'

    # Mutation example
    class Example

      # rubocop:disable Style/MutableConstant
      ALL = []

      # Add example
      #
      # @return [undefined]
      def self.add(*types, &block)
        ALL << DSL.call(caller_locations(1).first, Set.new(types), block)
      end

      Pathname.glob(Pathname.new(__dir__).parent.parent.join('meta', '*.rb'))
        .sort
        .each(&method(:require))

      ALL.freeze

      # Remove mutation method only present for DSL executions from meta/**/*.rb
      class << self
        undef_method :add
      end

    end # Example
  end # Meta
end # Mutant

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
mutant-0.11.21 lib/mutant/meta.rb
mutant-0.11.20 lib/mutant/meta.rb
mutant-0.11.19 lib/mutant/meta.rb
mutant-0.11.18 lib/mutant/meta.rb
mutant-0.11.17 lib/mutant/meta.rb
mutant-0.11.16 lib/mutant/meta.rb
mutant-0.11.15 lib/mutant/meta.rb
mutant-0.11.14 lib/mutant/meta.rb
mutant-0.11.13 lib/mutant/meta.rb
mutant-0.11.12 lib/mutant/meta.rb
mutant-0.11.11 lib/mutant/meta.rb
mutant-0.11.10 lib/mutant/meta.rb
mutant-0.11.9 lib/mutant/meta.rb
mutant-0.11.8 lib/mutant/meta.rb
mutant-0.11.7 lib/mutant/meta.rb
mutant-0.11.6 lib/mutant/meta.rb
mutant-0.11.5 lib/mutant/meta.rb
mutant-0.11.4 lib/mutant/meta.rb
mutant-0.11.3 lib/mutant/meta.rb
mutant-0.11.2 lib/mutant/meta.rb