3390abc675
This will allow to use reporters from matchers avoiding stupid direct writes to $stderr. Also it will allow to remove matching from CLI altogether in a phase of the runner. Allowing to decouple Mutant::Config from VM environment allowing to serialize it ;) Step by step. Takes a while.
40 lines
704 B
Ruby
40 lines
704 B
Ruby
module Mutant
|
|
# Abstract matcher to find subjects to mutate
|
|
class Matcher
|
|
include Adamantium::Flat, Enumerable, AbstractType
|
|
|
|
# Default matcher build implementation
|
|
#
|
|
# @param [Env] env
|
|
# @param [Object] input
|
|
#
|
|
# @return [undefined]
|
|
#
|
|
# @api private
|
|
#
|
|
def self.build(*arguments)
|
|
new(*arguments)
|
|
end
|
|
|
|
# Enumerate subjects
|
|
#
|
|
# @api private
|
|
#
|
|
# @return [self]
|
|
# if block given
|
|
#
|
|
# @return [Enumerabe<Subject>]
|
|
# otherwise
|
|
#
|
|
abstract_method :each
|
|
|
|
# Return identification
|
|
#
|
|
# @return [String
|
|
#
|
|
# @api private
|
|
#
|
|
abstract_method :identification
|
|
|
|
end # Matcher
|
|
end # Mutant
|