Class: Cloudmaster::Configuration
- Inherits:
-
BasicConfiguration
- Object
- BasicConfiguration
- Cloudmaster::Configuration
- Defined in:
- app/configuration.rb
Constant Summary
Constants inherited from BasicConfiguration
BasicConfiguration::DEFAULT_CONFIG_FILES, BasicConfiguration::DEFAULT_SEARCH_PATH
Instance Attribute Summary collapse
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#pools ⇒ Object
readonly
Returns the value of attribute pools.
Attributes inherited from BasicConfiguration
Instance Method Summary collapse
-
#initialize(config_files = [], opts = []) ⇒ Configuration
constructor
Create a config structure by reading the given config_filenames.
- #refresh ⇒ Object
Methods inherited from BasicConfiguration
add_config_files, add_search_paths, #keys, setup_config_files, setup_search_path
Constructor Details
#initialize(config_files = [], opts = []) ⇒ Configuration
Create a config structure by reading the given config_filenames. The base class handles the aws config and the default config.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/configuration.rb', line 16 def initialize(config_files = [], opts = []) @pools = [] @default = {} @opts = opts # search for config files in this directory too super(config_files, [ File.dirname(__FILE__)]) @default.merge!({:user_data => { :aws_env => @aws[:aws_env], :aws_access_key => @aws[:aws_access_key], :aws_secret_key => @aws[:aws_secret_key]}}) end |
Instance Attribute Details
#default ⇒ Object (readonly)
Returns the value of attribute default.
12 13 14 |
# File 'app/configuration.rb', line 12 def default @default end |
#pools ⇒ Object (readonly)
Returns the value of attribute pools.
12 13 14 |
# File 'app/configuration.rb', line 12 def pools @pools end |
Instance Method Details
#refresh ⇒ Object
28 29 30 31 32 |
# File 'app/configuration.rb', line 28 def refresh @pools = [] @default = {} super end |