Class: ConfigTemplates::Collections::Templates

Inherits:
Object
  • Object
show all
Defined in:
lib/config_templates/collections/templates.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, locator) ⇒ Templates

Returns a new instance of Templates.



5
6
7
8
# File 'lib/config_templates/collections/templates.rb', line 5

def initialize(config, locator)
  @config = config
  @locator = locator
end

Instance Method Details

#find_allObject



10
11
12
13
14
# File 'lib/config_templates/collections/templates.rb', line 10

def find_all
  @locator.templates.map do |path|
    ::ConfigTemplates::Models::Template.new path, @config
  end
end