Class: Promoted::Ruby::Client::Sampler
- Inherits:
-
Object
- Object
- Promoted::Ruby::Client::Sampler
- Defined in:
- lib/promoted/ruby/client/sampler.rb
Instance Method Summary collapse
Instance Method Details
#sample_random?(threshold) ⇒ Boolean
5 6 7 8 9 |
# File 'lib/promoted/ruby/client/sampler.rb', line 5 def sample_random? (threshold) true if threshold >= 1.0 false if threshold <= 0.0 threshold >= rand() end |