Class: Hackle::TargetMatcher
- Inherits:
-
Object
- Object
- Hackle::TargetMatcher
- Defined in:
- lib/hackle/internal/evaluation/match/target/target_matcher.rb
Instance Method Summary collapse
-
#initialize(condition_matcher_factory:) ⇒ TargetMatcher
constructor
A new instance of TargetMatcher.
- #matches(request, context, target) ⇒ boolean
Constructor Details
#initialize(condition_matcher_factory:) ⇒ TargetMatcher
Returns a new instance of TargetMatcher.
7 8 9 10 |
# File 'lib/hackle/internal/evaluation/match/target/target_matcher.rb', line 7 def initialize(condition_matcher_factory:) # @type [ConditionMatcherFactory] @condition_matcher_factory = condition_matcher_factory end |
Instance Method Details
#matches(request, context, target) ⇒ boolean
16 17 18 |
# File 'lib/hackle/internal/evaluation/match/target/target_matcher.rb', line 16 def matches(request, context, target) target.conditions.all? { |it| condition_matches(request, context, it) } end |