2014-02-13 10:47:29 -05:00
|
|
|
module Mutant
|
|
|
|
class Matcher
|
|
|
|
# A null matcher, that does not match any subjects
|
|
|
|
class Null < self
|
2014-07-06 10:30:28 -04:00
|
|
|
include Concord.new
|
2014-02-13 10:47:29 -05:00
|
|
|
|
|
|
|
# Enumerate subjects
|
|
|
|
#
|
|
|
|
# @return [Enumerator<Subject]
|
|
|
|
# if no block given
|
|
|
|
#
|
|
|
|
# @return [self]
|
|
|
|
# otherwise
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2014-05-27 11:12:36 -04:00
|
|
|
def each
|
2014-02-13 10:47:29 -05:00
|
|
|
return to_enum unless block_given?
|
|
|
|
self
|
|
|
|
end
|
|
|
|
|
|
|
|
end # Null
|
|
|
|
end # Matcher
|
|
|
|
end # Mutant
|