Class: ConfigTemplates::Repositories::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/config_templates/repositories/settings.rb

Instance Method Summary collapse

Constructor Details

#initialize(locator) ⇒ Settings

Returns a new instance of Settings.



5
6
7
# File 'lib/config_templates/repositories/settings.rb', line 5

def initialize(locator)
  @locator = locator
end

Instance Method Details

#find_allObject



9
10
11
12
13
# File 'lib/config_templates/repositories/settings.rb', line 9

def find_all
  @find_all ||= @locator.settings.reduce({}) {
    |result, current| result.merge ::YAML.load_file current, Hash.new
  }
end