Module: FuturoCube::CommandHelper

Included in:
DumpCommand, VerifyCommand
Defined in:
lib/futurocube/command_helper.rb

Instance Method Summary collapse

Instance Method Details

#with_progress(title, total, &block) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/futurocube/command_helper.rb', line 5

def with_progress(title, total, &block)
  progress = ProgressBar.new(title, total)
  begin
    block.call(progress)
  ensure
    progress.finish
  end
end