Batchr
Installation
With Bundler
gem 'batchr'
With Only Rubygems
$ gem install batchr
Usage
class Receiver
def self. objects = []
# your code do deal with a "batch" of objects
end
end
Batchr.batch(Receiver, :message) do |batchr|
# batchr.batch_size = 400 (default)
1_000_000.times do
batchr << rand
end
end
Contributing
Want to contribute? Great!
- Fork it.
- Create a branch (git checkout -b my_feature).
- Commit your changes (git commit -am "Added Awesomeness").
- Push to the branch (git push origin my_feature).
- Create an Issue with a link to your branch.
- Enjoy a refreshing beverage of your choice and wait.