Class: Mutant::Matcher Private
- Inherits:
-
Object
- Object
- Mutant::Matcher
- Includes:
- Unparser::AbstractType, Unparser::Adamantium
- Defined in:
- lib/mutant/matcher.rb,
lib/mutant/matcher/null.rb,
lib/mutant/matcher/chain.rb,
lib/mutant/matcher/scope.rb,
lib/mutant/matcher/config.rb,
lib/mutant/matcher/filter.rb,
lib/mutant/matcher/method.rb,
lib/mutant/matcher/static.rb,
lib/mutant/matcher/methods.rb,
lib/mutant/matcher/namespace.rb,
lib/mutant/matcher/descendants.rb,
lib/mutant/matcher/method/instance.rb,
lib/mutant/matcher/method/metaclass.rb,
lib/mutant/matcher/method/singleton.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.
Abstract matcher to find subjects to mutate
Defined Under Namespace
Classes: Chain, Config, Descendants, Filter, Method, Methods, Namespace, Null, Scope, Static
Class Method Summary collapse
-
.expand(env:) ⇒ Matcher
private
Turn config into matcher.
Instance Method Summary collapse
-
#call ⇒ Enumerable<Subject>
private
Call matcher.
Class Method Details
.expand(env:) ⇒ Matcher
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.
Turn config into matcher
21 22 23 24 25 26 27 28 |
# File 'lib/mutant/matcher.rb', line 21 def self.(env:) matcher_config = env.config.matcher Filter.new( matcher: Chain.new(matchers: matcher_config.subjects.map { |subject| subject.matcher(env:) }), predicate: method(:allowed_subject?).curry.call(matcher_config) ) end |
Instance Method Details
#call ⇒ Enumerable<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.
Call matcher
14 |
# File 'lib/mutant/matcher.rb', line 14 abstract_method :call |