Class: ConfigTemplates::Collections::Settings
- Inherits:
-
Object
- Object
- ConfigTemplates::Collections::Settings
- Defined in:
- lib/config_templates/collections/settings.rb
Instance Method Summary collapse
- #find_all ⇒ Object
-
#initialize(locator) ⇒ Settings
constructor
A new instance of Settings.
Constructor Details
#initialize(locator) ⇒ Settings
Returns a new instance of Settings.
5 6 7 |
# File 'lib/config_templates/collections/settings.rb', line 5 def initialize(locator) @locator = locator end |
Instance Method Details
#find_all ⇒ Object
9 10 11 12 13 |
# File 'lib/config_templates/collections/settings.rb', line 9 def find_all @find_all ||= @locator.settings.reduce({}) do |result, current| ::DeepMerge.deep_merge! ::YAML.load_file(current, Hash.new), result end end |