Sha256: 9d9a79792659ed86bff21419432fa23a1e27b6c75ab9600f22c8aaf3dba8f903
Contents?: true
Size: 841 Bytes
Versions: 31
Compression:
Stored size: 841 Bytes
Contents
# encoding: utf-8 module Mutant class Matcher # A chain of matchers class Chain < self include Concord::Public.new(:matchers) # Enumerate subjects # # @return [Enumerator<Subject] # if no block given # # @return [self] # otherwise # # @api private # def each(&block) return to_enum unless block_given? matchers.each do |matcher| matcher.each(&block) end self end # Build matcher chain # # @param [Enumerable<Matcher>] matchers # # @return [Matcher] # # @api private # def self.build(matchers) if matchers.length == 1 return matchers.first end new(matchers) end end # Chain end # Matcher end # Mutant
Version data entries
31 entries across 31 versions & 1 rubygems