Class: Mutant::Matcher::Namespace
- Inherits:
-
Mutant::Matcher
- Object
- Mutant::Matcher
- Mutant::Matcher::Namespace
- Defined in:
- lib/mutant/matcher/namespace.rb
Overview
Matcher for specific namespace
Class Method Summary collapse
-
.scope_name(scope) ⇒ String?
private
Return scope name.
Instance Method Summary collapse
-
#each(&block) ⇒ self, Enumerator<Subject>
private
Enumerate subjects.
Methods inherited from Mutant::Matcher
Class Method Details
.scope_name(scope) ⇒ String?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return scope name
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/mutant/matcher/namespace.rb', line 69 def self.scope_name(scope) scope.name rescue => exception $stderr.puts <<-MESSAGE WARNING: While optaining #{scope.class}#name from: #{scope.inspect} It raised an error: #{exception.inspect} fix your lib! MESSAGE nil end |
Instance Method Details
#each(&block) ⇒ self, Enumerator<Subject>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Enumerate subjects
20 21 22 23 24 25 26 27 28 |
# File 'lib/mutant/matcher/namespace.rb', line 20 def each(&block) return to_enum unless block_given? scopes.each do |scope| Scope.each(cache, scope, &block) end self end |