Class: Gaudi::Configuration::SystemConfiguration

Inherits:
Loader
  • Object
show all
Includes:
EnvironmentOptions
Defined in:
lib/gaudi/helpers/configuration.rb

Overview

The central configuration for the system

The available functionality is extended through SystemModules modules

Instance Attribute Summary collapse

Attributes inherited from Loader

#config, #configuration_files

Class Method Summary collapse

Instance Method Summary collapse

Methods included from EnvironmentOptions

#component, #deployment, #user, #user!

Methods inherited from Loader

#merge, #read_configuration, #to_s

Constructor Details

#initialize(filename) ⇒ SystemConfiguration

Returns a new instance of SystemConfiguration


286
287
288
289
290
291
292
293
294
295
# File 'lib/gaudi/helpers/configuration.rb', line 286

def initialize filename
  load_gaudi_modules(File.expand_path(filename))
  super(filename)
  @config_base=File.dirname(configuration_files.first)
  raise GaudiConfigurationError, "Setting 'base' must be defined" unless base
  raise GaudiConfigurationError, "Setting 'out' must be defined" unless out
  @workspace=Dir.pwd
  @timestamp = Time.now
  load_platform_configurations
end

Instance Attribute Details

#config_baseObject

Returns the value of attribute config_base


285
286
287
# File 'lib/gaudi/helpers/configuration.rb', line 285

def config_base
  @config_base
end

#timestampObject

Returns the value of attribute timestamp


285
286
287
# File 'lib/gaudi/helpers/configuration.rb', line 285

def timestamp
  @timestamp
end

#workspaceObject

Returns the value of attribute workspace


285
286
287
# File 'lib/gaudi/helpers/configuration.rb', line 285

def workspace
  @workspace
end

Class Method Details

.load(configuration_files) ⇒ Object

I guess this is what you call a Factory Method?


281
282
283
# File 'lib/gaudi/helpers/configuration.rb', line 281

def self.load configuration_files
  super(configuration_files,self)
end

Instance Method Details

#keysObject


297
298
299
# File 'lib/gaudi/helpers/configuration.rb', line 297

def keys
  load_key_modules(Gaudi::Configuration::SystemModules)
end