Module: ProgressBar::LengthCalculator

Included in:
Base
Defined in:
lib/ruby-progressbar/length_calculator.rb

Instance Method Summary collapse

Instance Method Details

#initialize(options) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/ruby-progressbar/length_calculator.rb', line 3

def initialize(options)
  @length_override = ENV['RUBY_PROGRESS_BAR_LENGTH'] || options[:length]
  @length_override = @length_override.to_i if @length_override
  @current_length  = nil

  super()
end