Exception: SplitIoClient::AllKeysMatcher
- Inherits:
-
NoMethodError
- Object
- NoMethodError
- SplitIoClient::AllKeysMatcher
- Defined in:
- lib/engine/matchers/all_keys_matcher.rb
Overview
class to implement the all keys matcher
Instance Attribute Summary collapse
-
#matcher_type ⇒ Object
readonly
Returns the value of attribute matcher_type.
Instance Method Summary collapse
-
#equals?(obj) ⇒ Boolean
evaluates if the given object equals the matcher.
-
#initialize ⇒ AllKeysMatcher
constructor
A new instance of AllKeysMatcher.
-
#match?(_key, _attributes) ⇒ boolean
evaluates if the key matches the matcher.
-
#to_s ⇒ Object
function to print string value for this matcher.
Constructor Details
#initialize ⇒ AllKeysMatcher
Returns a new instance of AllKeysMatcher.
8 9 10 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 8 def initialize @matcher_type = 'ALL_KEYS' end |
Instance Attribute Details
#matcher_type ⇒ Object (readonly)
Returns the value of attribute matcher_type.
6 7 8 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 6 def matcher_type @matcher_type end |
Instance Method Details
#equals?(obj) ⇒ Boolean
evaluates if the given object equals the matcher
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 28 def equals?(obj) if obj.nil? false elsif equal?(obj) true elsif !obj.instance_of?(AllKeysMatcher) false else true end end |
#match?(_key, _attributes) ⇒ boolean
evaluates if the key matches the matcher
18 19 20 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 18 def match?(_key, _attributes) true end |
#to_s ⇒ Object
function to print string value for this matcher
44 45 46 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 44 def to_s 'in segment all' end |