Class: InchByInch::ProgressEnumerable

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/inch_by_inch/progress_enumerable.rb

Instance Method Summary collapse

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

#eachObject



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