Sha256: abd5d1127fe161d6aceeb8a1e52a780ac4e7d3ff195102f4c13fd39b4c5009dc
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
# Fortschritt ## Installation Add this line to your application's Gemfile: ```ruby gem 'fortschritt' ``` And then execute: $ bundle Or install it yourself as: $ gem install fortschritt ## Usage Start a progress bar by calling `with_fortschritt` on an `Enumerable` or an `ActiveRecord::Relation`. It will create a new progress bar, that will be incremented by calling `Fortschritt.increment`. However, for convenience you can call `#fortschritt` on your iterated objects as well. It will call `Fortschritt.increment` and return `self`, so you can chain it up nicely. ```ruby User.all.with_fortschritt.find_each do |user| user.fortschritt.valid? end # will print something like this: 1616/145096 → 00:13:21 → ETA 2016-02-04 18:11:50 ``` ### Silent If no output is required or wanted invoke `with_fortschritt` with the `silent: true` option ```ruby User.all.with_fortschritt(silent: true).find_each do |user| user.fortschritt.valid? end # won't output any progress ``` ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/xijo/fortschritt.
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fortschritt-0.2.5 | README.md |
fortschritt-0.2.4 | README.md |
fortschritt-0.2.3 | README.md |