Class: Mutant::Matcher::Descendants Private
- Inherits:
-
Mutant::Matcher
- Object
- Mutant::Matcher
- Mutant::Matcher::Descendants
- Defined in:
- lib/mutant/matcher/descendants.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Matcher for all descendants by constant name
Instance Method Summary collapse
- #call(env) ⇒ Object private
Methods inherited from Mutant::Matcher
Instance Method Details
#call(env) ⇒ Object
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.
9 10 11 12 13 14 15 |
# File 'lib/mutant/matcher/descendants.rb', line 9 def call(env) const = env.world.try_const_get(const_name) or return EMPTY_ARRAY Chain.new( matchers: matched_scopes(env, const).map { |scope| Scope.new(scope:) } ).call(env) end |