Class: BBC::Cosmos::Tools::Config::ProjectConfig
- Inherits:
-
Object
- Object
- BBC::Cosmos::Tools::Config::ProjectConfig
- Defined in:
- lib/bbc/cosmos/tools/config/project_config.rb
Instance Method Summary collapse
- #components ⇒ Object
- #generate(id) ⇒ Object
- #generate_cosmos(id) ⇒ Object
-
#initialize(config_path, project, env = 'int') ⇒ ProjectConfig
constructor
A new instance of ProjectConfig.
Constructor Details
#initialize(config_path, project, env = 'int') ⇒ ProjectConfig
Returns a new instance of ProjectConfig.
10 11 12 13 14 |
# File 'lib/bbc/cosmos/tools/config/project_config.rb', line 10 def initialize(config_path, project, env = 'int') @project = project @env = env @config_path = config_path end |
Instance Method Details
#components ⇒ Object
16 17 18 |
# File 'lib/bbc/cosmos/tools/config/project_config.rb', line 16 def components config['components'].keys end |
#generate(id) ⇒ Object
20 21 22 |
# File 'lib/bbc/cosmos/tools/config/project_config.rb', line 20 def generate(id) component_config id end |
#generate_cosmos(id) ⇒ Object
24 25 26 27 28 |
# File 'lib/bbc/cosmos/tools/config/project_config.rb', line 24 def generate_cosmos(id) generate(id).reduce([]) do |object, (key, value)| object.tap { |o| o << {:value => value, :key => key} } end end |