Class: CookbookCreator::Helpers
- Inherits:
-
Object
- Object
- CookbookCreator::Helpers
- Defined in:
- lib/cookbook_creator/helpers.rb
Class Method Summary collapse
- .load_config_file(default_options, modified_options) ⇒ Object
- .merge_configs(default_config, config, sym_hash) ⇒ Object
Instance Method Summary collapse
Class Method Details
.load_config_file(default_options, modified_options) ⇒ Object
9 10 11 12 |
# File 'lib/cookbook_creator/helpers.rb', line 9 def self.load_config_file(, ) config_file = .merge!()[:config_file] File.exists?(config_file) ? config_file : raise_er end |
.merge_configs(default_config, config, sym_hash) ⇒ Object
18 19 20 21 22 |
# File 'lib/cookbook_creator/helpers.rb', line 18 def self.merge_configs(default_config, config, sym_hash) combined_config = default_config.merge!(sym_hash) = combined_config.merge(config) config.replace() end |
Instance Method Details
#raise_er ⇒ Object
14 15 16 |
# File 'lib/cookbook_creator/helpers.rb', line 14 def raise_er raise 'Selected config file does not exists or does not have read permissions' end |