class ProgressBar::Components::EstimatedTimer

Constants

VALID_OOB_TIME_FORMATS

Public Class Methods

new(options = {}) click to toggle source
# File lib/progress_bar/components/estimated_timer.rb, line 9
def initialize(options = {})
  super
end

Public Instance Methods

out_of_bounds_time_format=(format) click to toggle source
# File lib/progress_bar/components/estimated_timer.rb, line 23
def out_of_bounds_time_format=(format)
  raise "Invalid Out Of Bounds time format.  Valid formats are #{VALID_OOB_TIME_FORMATS.inspect}" unless VALID_OOB_TIME_FORMATS.include? format

  @out_of_bounds_time_format = format
end
reset() click to toggle source
# File lib/progress_bar/components/estimated_timer.rb, line 18
def reset
  as(Timer).reset
  as(Progressable).reset
end
start(options = {}) click to toggle source
# File lib/progress_bar/components/estimated_timer.rb, line 13
def start(options = {})
  as(Timer).start
  as(Progressable).start(options)
end
to_s() click to toggle source
# File lib/progress_bar/components/estimated_timer.rb, line 29
def to_s
  " ETA: #{estimated_time}"
end