2012-07-23 16:54:35 -04:00
|
|
|
module Mutant
|
2013-01-21 14:08:30 -05:00
|
|
|
# Abstract matcher to find subjects to mutate
|
2012-07-23 16:54:35 -04:00
|
|
|
class Matcher
|
2012-11-26 05:30:00 -05:00
|
|
|
include Adamantium::Flat, Enumerable, AbstractType
|
2012-07-23 16:54:35 -04:00
|
|
|
|
2013-07-04 18:54:50 -04:00
|
|
|
# Default matcher build implementation
|
|
|
|
#
|
2014-06-30 09:06:57 -04:00
|
|
|
# @param [Env] env
|
2013-07-04 18:54:50 -04:00
|
|
|
# @param [Object] input
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def self.build(*arguments)
|
|
|
|
new(*arguments)
|
|
|
|
end
|
|
|
|
|
2012-08-01 12:34:03 -04:00
|
|
|
# Enumerate subjects
|
2012-07-23 16:54:35 -04:00
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2013-01-21 14:08:30 -05:00
|
|
|
# @return [self]
|
|
|
|
# if block given
|
|
|
|
#
|
|
|
|
# @return [Enumerabe<Subject>]
|
|
|
|
# otherwise
|
2012-07-23 19:41:08 -04:00
|
|
|
#
|
2012-08-02 19:28:15 -04:00
|
|
|
abstract_method :each
|
2012-07-26 13:25:23 -04:00
|
|
|
|
2012-08-15 22:10:54 -04:00
|
|
|
# Return identification
|
|
|
|
#
|
|
|
|
# @return [String
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
abstract_method :identification
|
2013-06-14 14:54:02 -04:00
|
|
|
|
|
|
|
end # Matcher
|
|
|
|
end # Mutant
|