Module: Unleash::Strategy::Util
- Defined in:
- lib/unleash/strategy/util.rb
Constant Summary collapse
- NORMALIZER =
100
Class Method Summary collapse
-
.get_normalized_number(identifier, group_id) ⇒ Object
convert the two strings () into a number between 1 and 100.
Class Method Details
.get_normalized_number(identifier, group_id) ⇒ Object
convert the two strings () into a number between 1 and 100
11 12 13 |
# File 'lib/unleash/strategy/util.rb', line 11 def get_normalized_number(identifier, group_id) MurmurHash3::V32.str_hash("#{group_id}:#{identifier}") % NORMALIZER + 1 end |