Class: Hackle::SegmentMatcher
- Inherits:
-
Object
- Object
- Hackle::SegmentMatcher
- Defined in:
- lib/hackle/internal/evaluation/match/condition/segment/segment_condition_matcher.rb
Instance Method Summary collapse
-
#initialize(user_condition_matcher:) ⇒ SegmentMatcher
constructor
A new instance of SegmentMatcher.
- #matches(request, context, segment) ⇒ boolean
Constructor Details
#initialize(user_condition_matcher:) ⇒ SegmentMatcher
Returns a new instance of SegmentMatcher.
44 45 46 47 |
# File 'lib/hackle/internal/evaluation/match/condition/segment/segment_condition_matcher.rb', line 44 def initialize(user_condition_matcher:) # @type [ConditionMatcher] @user_condition_matcher = user_condition_matcher end |
Instance Method Details
#matches(request, context, segment) ⇒ boolean
53 54 55 |
# File 'lib/hackle/internal/evaluation/match/condition/segment/segment_condition_matcher.rb', line 53 def matches(request, context, segment) segment.targets.any? { |it| target_matches(request, context, it) } end |