Class: SplitIoClient::AllKeysMatcher
- Inherits:
-
Object
- Object
- SplitIoClient::AllKeysMatcher
- Defined in:
- lib/splitclient-rb/engine/matchers/all_keys_matcher.rb
Overview
class to implement the all keys matcher
Constant Summary collapse
- MATCHER_TYPE =
'ALL_KEYS'.freeze
Instance Method Summary collapse
-
#equals?(obj) ⇒ boolean
evaluates if the given object equals the matcher.
-
#match?(_args) ⇒ boolean
evaluates if the key matches the matcher.
- #string_type? ⇒ Boolean
-
#to_s ⇒ Object
function to print string value for this matcher.
Instance Method Details
#equals?(obj) ⇒ boolean
evaluates if the given object equals the matcher
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/splitclient-rb/engine/matchers/all_keys_matcher.rb', line 22 def equals?(obj) if obj.nil? false elsif equal?(obj) true elsif !obj.instance_of?(AllKeysMatcher) false else true end end |
#match?(_args) ⇒ boolean
evaluates if the key matches the matcher
12 13 14 |
# File 'lib/splitclient-rb/engine/matchers/all_keys_matcher.rb', line 12 def match?(_args) true end |
#string_type? ⇒ Boolean
34 35 36 |
# File 'lib/splitclient-rb/engine/matchers/all_keys_matcher.rb', line 34 def string_type? false end |
#to_s ⇒ Object
function to print string value for this matcher
42 43 44 |
# File 'lib/splitclient-rb/engine/matchers/all_keys_matcher.rb', line 42 def to_s 'in segment all' end |