Class: StackedConfig::Orchestrator
- Inherits:
-
SuperStack::Manager
- Object
- SuperStack::Manager
- StackedConfig::Orchestrator
- Includes:
- ProgramDescriptionHelper
- Defined in:
- lib/stacked_config/orchestrator.rb
Instance Attribute Summary collapse
-
#command_line_layer ⇒ Object
readonly
Returns the value of attribute command_line_layer.
-
#env_layer ⇒ Object
readonly
Returns the value of attribute env_layer.
-
#gem_layer ⇒ Object
readonly
Returns the value of attribute gem_layer.
-
#global_layer ⇒ Object
readonly
Returns the value of attribute global_layer.
-
#provided_config_file_layer ⇒ Object
readonly
Returns the value of attribute provided_config_file_layer.
-
#system_layer ⇒ Object
readonly
Returns the value of attribute system_layer.
-
#user_layer ⇒ Object
readonly
Returns the value of attribute user_layer.
Attributes included from ProgramDescriptionHelper
#app_description, #app_name, #app_version, #config_file_base_name
Class Method Summary collapse
Instance Method Summary collapse
- #include_env_layer(filter = nil, priority = 60) ⇒ Object
-
#initialize ⇒ Orchestrator
constructor
A new instance of Orchestrator.
Methods included from ProgramDescriptionHelper
#add_command_line_section, #command_line_help, #describes_application, #detailed_layers_info, #rescan_layers
Constructor Details
#initialize ⇒ Orchestrator
Returns a new instance of Orchestrator.
9 10 11 12 13 14 15 |
# File 'lib/stacked_config/orchestrator.rb', line 9 def initialize super self.merge_policy = SuperStack::MergePolicies::FullMergePolicy setup_layers default_name = self.class.default_config_file_base_name describes_application config_file_base_name: default_name, app_name: default_name end |
Instance Attribute Details
#command_line_layer ⇒ Object (readonly)
Returns the value of attribute command_line_layer.
6 7 8 |
# File 'lib/stacked_config/orchestrator.rb', line 6 def command_line_layer @command_line_layer end |
#env_layer ⇒ Object (readonly)
Returns the value of attribute env_layer.
6 7 8 |
# File 'lib/stacked_config/orchestrator.rb', line 6 def env_layer @env_layer end |
#gem_layer ⇒ Object (readonly)
Returns the value of attribute gem_layer.
6 7 8 |
# File 'lib/stacked_config/orchestrator.rb', line 6 def gem_layer @gem_layer end |
#global_layer ⇒ Object (readonly)
Returns the value of attribute global_layer.
6 7 8 |
# File 'lib/stacked_config/orchestrator.rb', line 6 def global_layer @global_layer end |
#provided_config_file_layer ⇒ Object (readonly)
Returns the value of attribute provided_config_file_layer.
6 7 8 |
# File 'lib/stacked_config/orchestrator.rb', line 6 def provided_config_file_layer @provided_config_file_layer end |
#system_layer ⇒ Object (readonly)
Returns the value of attribute system_layer.
6 7 8 |
# File 'lib/stacked_config/orchestrator.rb', line 6 def system_layer @system_layer end |
#user_layer ⇒ Object (readonly)
Returns the value of attribute user_layer.
6 7 8 |
# File 'lib/stacked_config/orchestrator.rb', line 6 def user_layer @user_layer end |
Class Method Details
.default_config_file_base_name ⇒ Object
18 19 20 |
# File 'lib/stacked_config/orchestrator.rb', line 18 def self.default_config_file_base_name File.basename($PROGRAM_NAME).gsub /\.[^\.]+$/, '' end |
Instance Method Details
#include_env_layer(filter = nil, priority = 60) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/stacked_config/orchestrator.rb', line 22 def include_env_layer(filter = nil, priority = 60) @env_layer = StackedConfig::Layers::EnvLayer.new filter env_layer.name = 'Environment variables level' env_layer.priority = priority self << env_layer end |