free_mutant/lib/mutant/matcher.rb
Markus Schirp 3390abc675 Use environment object inside matchers
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.
2014-06-30 13:08:52 +00:00

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