lib/awestruct/cli/options.rb in awestruct-0.5.5 vs lib/awestruct/cli/options.rb in awestruct-0.5.6.beta
- old
+ new
@@ -33,10 +33,11 @@
attr_accessor :verbose
attr_accessor :quiet
attr_accessor :source_dir
attr_accessor :output_dir
attr_accessor :livereload
+ attr_accessor :debug
def initialize()
@generate = nil
@server = false
@port = DEFAULT_PORT
@@ -61,9 +62,12 @@
Options.new.parse! args
end
def parse!(args)
opts = OptionParser.new do |opts|
+ opts.on('-D', '--debug', 'Enable debug logging') do |verbose|
+ self.debug = true
+ end
opts.on('-w', '--verbose', 'Enable verbose mode') do |verbose|
self.verbose = true
end
opts.on('-q', '--quiet', 'Only display warnings and errors') do |quiet|
self.quiet = true