wc
This commit is contained in:
parent
b712e9bf5f
commit
b0d547fda0
1 changed files with 14 additions and 10 deletions
6
wc.rb
6
wc.rb
|
@ -58,7 +58,7 @@ def print_total(total_stats, max_widths, options)
|
|||
puts "#{total_result} 合計"
|
||||
end
|
||||
|
||||
options, input_sources = parse_options
|
||||
def process_input_sources(input_sources, options)
|
||||
total_stats = [0, 0, 0]
|
||||
max_widths = [0, 0, 0]
|
||||
|
||||
|
@ -71,3 +71,7 @@ input_sources.each do |source|
|
|||
end
|
||||
|
||||
print_total(total_stats, max_widths, options) if input_sources.size > 1
|
||||
end
|
||||
|
||||
options, input_sources = parse_options
|
||||
process_input_sources(input_sources, options)
|
||||
|
|
Loading…
Reference in a new issue