Sha256: df6125bbc394017493aec4fde85f6b727c6258f83d8a50bf81b978e34079ba38
Contents?: true
Size: 893 Bytes
Versions: 9
Compression:
Stored size: 893 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 MutableConstant ALL = [] # Add example # # @return [undefined] # # rubocop:disable Performance/Caller def self.add(*types, &block) file = caller.first.split(':in', 2).first ALL << DSL.call(file, 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
9 entries across 9 versions & 1 rubygems