Class: Spark::Command::Shuffle
- Inherits:
-
Object
- Object
- Spark::Command::Shuffle
- Defined in:
- lib/spark/command/basic.rb
Overview
Shuffle
Instance Method Summary collapse
Instance Method Details
#rng ⇒ Object
127 128 129 |
# File 'lib/spark/command/basic.rb', line 127 def rng Random.new(@seed) end |
#run(iterator) ⇒ Object
122 123 124 125 |
# File 'lib/spark/command/basic.rb', line 122 def run(iterator, *) iterator.shuffle!(random: rng) iterator end |