Sha256: f95e05ec5808aa46c502e533f816c0ce25d9ca2cbf1a1ebb7ae169bf4f6ae713
Contents?: true
Size: 519 Bytes
Versions: 3
Compression:
Stored size: 519 Bytes
Contents
module SplitIoClient class EqualToBooleanMatcher def self.matcher_type 'EQUAL_TO_BOOLEAN'.freeze end def initialize(attribute, boolean) @attribute = attribute @boolean = boolean end def match?(_matching_key, _bucketing_key, _evaluator, data) value = data.fetch(@attribute) { |attr| data[attr.to_s] || data[attr.to_sym] } value = false if value.to_s.downcase == 'false' value = true if value.to_s.downcase == 'true' value == @boolean end end end
Version data entries
3 entries across 3 versions & 1 rubygems