Method: ConfiguratorPlugins#find_plugin_hash_defaults
- Defined in:
- lib/ceedling/configurator_plugins.rb
#find_plugin_hash_defaults(config, plugin_paths) ⇒ Object
Gather up and return defaults generated by Ruby code in plugin paths + config/
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/ceedling/configurator_plugins.rb', line 146 def find_plugin_hash_defaults(config, plugin_paths) defaults_hash = {} config[:plugins][:enabled].each do |plugin| if path = plugin_paths[(plugin + '_path').to_sym] default_path = File.join(path, "config", "defaults_#{plugin}.rb") if @file_wrapper.exist?( default_path ) @system_wrapper.require_file( "defaults_#{plugin}.rb" ) object = eval("get_default_config()") defaults_hash[plugin.to_sym()] = object @plugin_hash_defaults << plugin end end end return defaults_hash end |