Sha256: 4574cd2320c5900f567cdc8b01c073cfc965f258f97960dc662823dce07d1842
Contents?: true
Size: 527 Bytes
Versions: 28
Compression:
Stored size: 527 Bytes
Contents
# frozen_string_literal: true require 'set' module SplitIoClient class SetMatcher def string_type? false end protected def initialize(attribute, remote_array) @attribute = attribute @remote_set = remote_array.to_set 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
28 entries across 28 versions & 1 rubygems