Sha256: ddce5570658bde62c84d17b1bd1598cd89aed84352a88997073a52fd4789ca7b

Contents?: true

Size: 682 Bytes

Versions: 33

Compression:

Stored size: 682 Bytes

Contents

# encoding: utf-8

module Mutant
  class Matcher
    # Matcher for specific namespace
    class Scope < self
      include Concord::Public.new(:cache, :scope)

      MATCHERS = [
        Matcher::Methods::Singleton,
        Matcher::Methods::Instance
      ].freeze

      # Enumerate subjects
      #
      # @return [self]
      #   if block given
      #
      # @return [Enumerator<Subject>]
      #   otherwise
      #
      # @api private
      #
      def each(&block)
        return to_enum unless block_given?

        MATCHERS.each do |matcher|
          matcher.each(cache, scope, &block)
        end

        self
      end

    end # Scope
  end # Matcher
end # Mutant

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
mutant-0.5.19 lib/mutant/matcher/scope.rb
mutant-0.5.18 lib/mutant/matcher/scope.rb
mutant-0.5.17 lib/mutant/matcher/scope.rb
mutant-0.5.16 lib/mutant/matcher/scope.rb
mutant-0.5.15 lib/mutant/matcher/scope.rb
mutant-0.5.14 lib/mutant/matcher/scope.rb
mutant-0.5.13 lib/mutant/matcher/scope.rb
mutant-0.5.12 lib/mutant/matcher/scope.rb
mutant-0.5.11 lib/mutant/matcher/scope.rb
mutant-0.5.10 lib/mutant/matcher/scope.rb
mutant-0.5.9 lib/mutant/matcher/scope.rb
mutant-0.5.8 lib/mutant/matcher/scope.rb
mutant-0.5.7 lib/mutant/matcher/scope.rb
mutant-0.5.6 lib/mutant/matcher/scope.rb
mutant-0.5.5 lib/mutant/matcher/scope.rb
mutant-0.5.4 lib/mutant/matcher/scope.rb
mutant-0.5.3 lib/mutant/matcher/scope.rb
mutant-0.5.2 lib/mutant/matcher/scope.rb
mutant-0.5.1 lib/mutant/matcher/scope.rb
mutant-0.5.0 lib/mutant/matcher/scope.rb