free_mutant/lib/mutant/config.rb
Markus Schirp 0fe8acc0ad Use morpher predicates for filtering
* Removes Mutant::Predicate
* Simplifies CLI builder logic
* More to come
2014-02-02 22:49:33 +01:00

36 lines
615 B
Ruby

# encoding: utf-8
module Mutant
# The configuration of a mutator run
class Config
include Adamantium::Flat, Anima.new(
:cache,
:debug,
:strategy,
:matcher,
:reporter,
:fail_fast,
:zombie,
:expected_coverage
)
# Enumerate subjects
#
# @api private
#
# @return [self]
# if block given
#
# @return [Enumerator<Subject>]
# otherwise
#
# @api private
#
def subjects(&block)
return to_enum(__method__) unless block_given?
matcher.each(&block)
self
end
end # Config
end # Mutant