Module: Featureflip::Evaluation::Bucketing
- Defined in:
- lib/featureflip/evaluation/bucketing.rb
Class Method Summary collapse
Class Method Details
.compute_bucket(salt, value) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/featureflip/evaluation/bucketing.rb', line 6 def self.compute_bucket(salt, value) input = "#{salt}:#{value}" hash_bytes = Digest::MD5.digest(input) hash_int = hash_bytes[0, 4].unpack1("V") hash_int % 100 end |