Method: WordCountRecursive::Command#initialize
- Defined in:
- lib/wcr/command.rb
#initialize ⇒ Command
Returns a new instance of Command.
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/wcr/command.rb', line 3 def initialize @paths, @options = ::WordCountRecursive::ArgumentsParser.new.parse if @options.include? :version puts @options[:version] exit(1) end @command = `wc #{@options[:command_opts]} #{"\`find #{@paths || '.'} -type f #{@options[:hidden_files]}\`"}` @command = @command.split('\n').grep(/^[^\.]/) end |