Class: Range
- Inherits:
-
Object
- Object
- Range
- Defined in:
- lib/chance/core_extensions.rb
Instance Method Summary collapse
Instance Method Details
#random ⇒ Object
63 64 65 66 67 68 69 70 |
# File 'lib/chance/core_extensions.rb', line 63 def random step_to, i = rand(count), 0 step do |obj| return obj if i == step_to i += 1 end end |