Sha256: c9db754c8c86e15d60a2e1fe4ac7211c1c86fee456a65840aee8769f929d0f37
Contents?: true
Size: 558 Bytes
Versions: 294
Compression:
Stored size: 558 Bytes
Contents
# frozen_string_literal: true require 'set' module SplitIoClient class SetMatcher def string_type? false end protected def initialize(attribute, remote_array, logger) @attribute = attribute @remote_set = remote_array.to_set @logger = logger end def local_set(data, attribute) data = data.fetch(attribute) { |a| data[a.to_s] || data[a.to_sym] } # Allow user to pass individual elements as well local_array = data.is_a?(Array) ? data : [data] local_array.to_set end end end
Version data entries
294 entries across 294 versions & 1 rubygems