Class: Sxn::UI::ProgressBar::Stepper

Inherits:
Object
  • Object
show all
Defined in:
lib/sxn/ui/progress_bar.rb

Overview

Helper class for step-by-step operations

Instance Method Summary collapse

Constructor Details

#initialize(progress_bar) ⇒ Stepper

Returns a new instance of Stepper.



76
77
78
# File 'lib/sxn/ui/progress_bar.rb', line 76

def initialize(progress_bar)
  @progress = progress_bar
end

Instance Method Details

#log(message) ⇒ Object



85
86
87
# File 'lib/sxn/ui/progress_bar.rb', line 85

def log(message)
  @progress.log(message)
end

#step(message = nil) ⇒ Object



80
81
82
83
# File 'lib/sxn/ui/progress_bar.rb', line 80

def step(message = nil)
  @progress.log(message) if message
  @progress.advance
end