Class: DTR::AveragePacker
- Inherits:
-
Object
- Object
- DTR::AveragePacker
- Defined in:
- lib/dtr/base.rb
Instance Method Summary collapse
Instance Method Details
#pack(test_files, num_packets) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/dtr/base.rb', line 6 def pack(test_files, num_packets) raise 'No test files given' if test_files.nil? || test_files.empty? @packets = Array.new(num_packets) {[]} test_files.each_with_index {|tf,i| @packets[i%num_packets] << tf } @packets end |