class ProgressBar::Calculators::Length

def terminal_width

rubocop:disable Style/RescueStandardError
Copyright (c) 2003, 2004 Jim Weirich
This code was copied and modified from Rake, available under MIT-LICENSE
def terminal_width
  return 80 unless unix?
  result = dynamic_width
  (result < 20) ? 80 : result
rescue
  80
end