Add debug mode in Env
This commit is contained in:
@@ -10,7 +10,7 @@ module Uh
|
||||
def_delegator :@output, :print
|
||||
|
||||
attr_reader :output
|
||||
attr_accessor :verbose
|
||||
attr_accessor :verbose, :debug
|
||||
|
||||
def initialize output
|
||||
@output = output
|
||||
@@ -20,6 +20,10 @@ module Uh
|
||||
!!@verbose
|
||||
end
|
||||
|
||||
def debug?
|
||||
!!@debug
|
||||
end
|
||||
|
||||
def logger
|
||||
@logger ||= Logger.new(@output).tap do |o|
|
||||
o.level = verbose? ? LOGGER_LEVEL_VERBOSE : LOGGER_LEVEL
|
||||
|
Reference in New Issue
Block a user