Commit 2616f99
committed
Add: Ability To Access Progress Bar Instance Using Enumerator Refinement
Why This Change Is Necessary
========================================================================
Without access to the progress bar instance, when using the refinement
there's a lack of ability to do things like log or modify the title
mid-progress like you can with the standard progress bar usage.
What These Changes Do To Address the Issue
========================================================================
If you pass a second argument to the block passed to `with_progressbar`,
the second argument will be the progress bar instance.
Side Effects Caused By This Change
========================================================================
None expected.
------------------------------------------------------------------------
**Relevant URLs:**
* [Current Ticket Link][1]
* [Original Ticket Link][2]
**Actions:**
* Closes 184
* Closes 185
------------------------------------------------------------------------
[1]: #185
[2]: #1841 parent 9e58074 commit 2616f99
File tree
2 files changed
+26
-10
lines changed- lib/ruby-progressbar/refinements
- spec/lib/ruby-progressbar/refinements
2 files changed
+26
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
7 | 6 | | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | | - | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
22 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
87 | 97 | | |
88 | 98 | | |
89 | 99 | | |
| |||
0 commit comments