Class: GitCli::Global

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/git_cli/global.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGlobal

Returns a new instance of Global.



29
30
31
32
33
34
35
36
37
# File 'lib/git_cli/global.rb', line 29

def initialize
  debug = ENV['GitCli_Debug']
  debugOut = ENV['GitCli_DebugOut'] || STDOUT
  if debug.nil?
    @logger = Tlogger.new('git_cli.log', 5, 1024*1024*10)
  else
    @logger = Tlogger.new(debugOut)
  end
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



28
29
30
# File 'lib/git_cli/global.rb', line 28

def logger
  @logger
end