📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-30 01:35:11
📂
/
/
opt
/
alt
/
ruby34
/
share
/
gems
/
gems
/
bundler-2.6.9
/
lib
/
bundler
/
vendor
/
thor
/
lib
/
thor
/
shell
✏️
Editing: column_printer.rb
require_relative "terminal" class Bundler::Thor module Shell class ColumnPrinter attr_reader :stdout, :options def initialize(stdout, options = {}) @stdout = stdout @options = options @indent = options[:indent].to_i end def print(array) return if array.empty? colwidth = (array.map { |el| el.to_s.size }.max || 0) + 2 array.each_with_index do |value, index| # Don't output trailing spaces when printing the last column if ((((index + 1) % (Terminal.terminal_width / colwidth))).zero? && !index.zero?) || index + 1 == array.length stdout.puts value else stdout.printf("%-#{colwidth}s", value) end end end end end end
💾 Save Changes
❌ Cancel