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.
10 11 12 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 10 def initialize @matcher_type = "ALL_KEYS" end |
Instance Attribute Details
#matcher_type ⇒ Object (readonly)
Returns the value of attribute matcher_type.
8 9 10 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 8 def matcher_type @matcher_type end |
Instance Method Details
#equals?(obj) ⇒ Boolean
evaluates if the given object equals the matcher
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 30 def equals?(obj) if obj.nil? false elsif self.equal?(obj) true elsif !obj.instance_of?(AllKeysMatcher) false else true end end |
#match?(key, attributes) ⇒ boolean
evaluates if the key matches the matcher
20 21 22 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 20 def match?(key, attributes) true end |
#to_s ⇒ Object
function to print string value for this matcher
46 47 48 |
# File 'lib/engine/matchers/all_keys_matcher.rb', line 46 def to_s 'in segment all' end |