free_mutant/lib/mutant/config.rb
Markus Schirp 8a6a51fd08 Add support for --fail-fast flag
* Some long planned runner design changes.
* It now also uses the emitter pattern
2013-07-15 01:17:15 +02:00

27 lines
534 B
Ruby

module Mutant
# The configuration of a mutator run
class Config
include Adamantium::Flat, Anima.new(
:cache, :debug, :strategy, :matcher, :filter, :reporter, :fail_fast
)
# 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