dabroz/array_with_progress

View on GitHub
lib/array_with_progress/array_progress_configuration.rb

Summary

Maintainability
A
0 mins
Test Coverage
class ArrayProgressConfiguration
  def self.terminal_width
    `tput cols`.to_i
  rescue Errno::ENOENT => e
    80
  end

  def self.item_width
    terminal_width - 22
  end
end