単語を間違えた

This commit is contained in:
Rikuoh Tsujitani 2024-08-01 09:47:39 +09:00
parent 7f96e3096c
commit 5e9c7fa37e
Signed by: riq0h
GPG key ID: 010F09DEA298C717

4
wc.rb
View file

@ -51,10 +51,10 @@ def calculate_max_widths(total_stat)
end
def format_row(stats, max_widths, options)
row = %i[lines words bytes].filter_map do |key|
columns = %i[lines words bytes].filter_map do |key|
stats[key].to_s.rjust(max_widths[key]) if options[key]
end
[*row, stats[:filename]].join(' ')
[*columns, stats[:filename]].join(' ')
end
main