Class: DevopsHelper::Global
- Inherits:
-
Object
- Object
- DevopsHelper::Global
- Includes:
- Singleton
- Defined in:
- lib/devops_helper/global.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#root_store ⇒ Object
readonly
Returns the value of attribute root_store.
Instance Method Summary collapse
-
#initialize ⇒ Global
constructor
A new instance of Global.
Constructor Details
#initialize ⇒ Global
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
#logger ⇒ Object
Returns the value of attribute logger.
10 11 12 |
# File 'lib/devops_helper/global.rb', line 10 def logger @logger end |
#root_store ⇒ Object (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 |