Method: Metrix::CLI#opts
- Defined in:
- lib/metrix/cli.rb
#opts ⇒ Object
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/metrix/cli.rb', line 246 def opts require "optparse" @opts ||= OptionParser.new do |o| o.on("-v", "--version") do puts "metrix #{Metrix::VERSION}" exit end o.on("-c PATH") do |value| @config_path = value end o.on("-d", "--debug") do |value| @foreground = true log_to_stdout Metrix.logger.level = Logger::DEBUG end end end |