16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/woodchuck/runner.rb', line 16
def read(args=ARGV)
options = {}
optparse = OptionParser.new do |opts|
opts.on('-l', '--log-level [LOG_LEVEL]', [:debug, :warn, :info, :error, :fatal], 'set the log level') do |level|
options[:log_level] = level.to_sym
end
opts.on('-o', '--output [OUTPUT]', 'set the output') do |output|
options[:output] = output.to_sym
end
opts.on('-p', '--paths [PATHS]', Array, 'A list of file paths to watch') do |paths|
options[:paths] = paths
end
end
optparse.parse!(args)
options
end
|