Class: DevopsHelper::Global

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGlobal

Returns a new instance of Global.



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/devops_helper/global.rb', line 12

def initialize()
  debug = ENV['DevOpsHelper_Debug']
  debugOut = ENV['DevOpsHelper_DebugOut'] || STDOUT

  if debug.nil?
    @logger = Tlogger.new('devops_helper.log', 5, 1024*1024*10)
  else
    @logger = Tlogger.new(debugOut)
  end
  @root_store = File.join(Dir.home,".devops_helper")
  FileUtils.mkdir_p(@root_store) if not File.exist?(@root_store)
end

Instance Attribute Details

#loggerObject

Returns the value of attribute logger.



10
11
12
# File 'lib/devops_helper/global.rb', line 10

def logger
  @logger
end

#root_storeObject (readonly)

Returns the value of attribute root_store.



11
12
13
# File 'lib/devops_helper/global.rb', line 11

def root_store
  @root_store
end