2013-07-28 19:03:06 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
2013-02-24 14:40:23 -05:00
|
|
|
module Mutant
|
|
|
|
# The configuration of a mutator run
|
|
|
|
class Config
|
|
|
|
include Adamantium::Flat, Anima.new(
|
2013-09-13 16:28:04 -04:00
|
|
|
:cache,
|
|
|
|
:debug,
|
|
|
|
:strategy,
|
|
|
|
:matcher,
|
|
|
|
:reporter,
|
|
|
|
:fail_fast,
|
2014-01-18 18:06:40 -05:00
|
|
|
:zombie,
|
|
|
|
:expected_coverage
|
2013-02-24 14:40:23 -05:00
|
|
|
)
|
2013-03-27 10:52:02 -04:00
|
|
|
|
|
|
|
# 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?
|
2014-02-02 16:48:08 -05:00
|
|
|
matcher.each(&block)
|
2013-03-27 10:52:02 -04:00
|
|
|
self
|
|
|
|
end
|
|
|
|
|
2013-06-14 14:54:02 -04:00
|
|
|
end # Config
|
|
|
|
end # Mutant
|