wc
This commit is contained in:
parent
0243e260b9
commit
d3fbc051bd
1 changed files with 2 additions and 1 deletions
3
wc.rb
3
wc.rb
|
@ -10,7 +10,8 @@ def parse_options
|
||||||
opts.on('-c') { options[:bytes] = true }
|
opts.on('-c') { options[:bytes] = true }
|
||||||
end.parse!
|
end.parse!
|
||||||
options = { bytes: true, lines: true, words: true } if options.empty?
|
options = { bytes: true, lines: true, words: true } if options.empty?
|
||||||
[options, ARGV.empty? ? ['-'] : ARGV]
|
sources = ARGV.empty? ? ['-'] : ARGV
|
||||||
|
[options, sources]
|
||||||
end
|
end
|
||||||
|
|
||||||
def input_stream_sources(input_sources, options)
|
def input_stream_sources(input_sources, options)
|
||||||
|
|
Loading…
Reference in a new issue