Registry / utility / pickup

pickup

JSON →
library0.0.11rbrubygemsunverified

Pickup helps you pick an item from a collection based on its weight or probability.

gem install pickup
INSTALL
IMPORT
SIG · PICKUP
P
pickup
utilityrubyv0.0.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pickup
require 'pickup'

Pick a random item based on weight

require 'pickup' items = { apple: 5, banana: 3, cherry: 2 } picker = Pickup.new(items) puts picker.pick
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.11latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
pickup — gem install pickup · libregistry