Class: InchByInch::ProgressEnumerable
- Inherits:
-
Object
- Object
- InchByInch::ProgressEnumerable
- Includes:
- Enumerable
- Defined in:
- lib/inch_by_inch/progress_enumerable.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(array) ⇒ ProgressEnumerable
constructor
A new instance of ProgressEnumerable.
Constructor Details
#initialize(array) ⇒ ProgressEnumerable
Returns a new instance of ProgressEnumerable.
5 6 7 |
# File 'lib/inch_by_inch/progress_enumerable.rb', line 5 def initialize(array) @array = Array(array) end |
Instance Method Details
#each ⇒ Object
9 10 11 12 13 14 |
# File 'lib/inch_by_inch/progress_enumerable.rb', line 9 def each @array.each do |e| print '.' yield e end.tap { puts } end |