Sha256: f13f4889c122b66ea4ab984e7648e21ba51312d275e99a384eb33259393774b9
Contents?: true
Size: 314 Bytes
Versions: 10
Compression:
Stored size: 314 Bytes
Contents
module Flipper module Expressions class PercentageOfActors SCALING_FACTOR = 1_000 def self.call(text, percentage, context: {}) prefix = context[:feature_name] || "" Zlib.crc32("#{prefix}#{text}") % (100 * SCALING_FACTOR) < percentage * SCALING_FACTOR end end end end
Version data entries
10 entries across 10 versions & 1 rubygems