Sha256: 2e16c646fa589965e5a86ca0ba33900548ab2fcef6e8ba22799d8466a42ba170
Contents?: true
Size: 963 Bytes
Versions: 10
Compression:
Stored size: 963 Bytes
Contents
module SplitIoClient # # class to implement the all keys matcher # class AllKeysMatcher < NoMethodError attr_reader :matcher_type def initialize @matcher_type = 'ALL_KEYS' end # # evaluates if the key matches the matcher # # @param key [string] key value to be matched # # @return [boolean] true for all instances def match?(_key, _attributes) true end # # evaluates if the given object equals the matcher # # @param obj [object] object to be evaluated # # @returns [boolean] true if obj equals the matcher def equals?(obj) if obj.nil? false elsif equal?(obj) true elsif !obj.instance_of?(AllKeysMatcher) false else true end end # # function to print string value for this matcher # # @reutrn [string] string value of this matcher def to_s 'in segment all' end end end
Version data entries
10 entries across 10 versions & 1 rubygems