Class: WeightedList::Sampler
- Inherits:
-
Object
- Object
- WeightedList::Sampler
- Defined in:
- lib/weighted_list/sampler.rb
Defined Under Namespace
Classes: Result
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(hash:, random:) ⇒ Sampler
constructor
A new instance of Sampler.
Constructor Details
#initialize(hash:, random:) ⇒ Sampler
Returns a new instance of Sampler.
5 6 7 8 |
# File 'lib/weighted_list/sampler.rb', line 5 def initialize(hash:, random:) @hash = hash @random = random end |