Class: Shanty::ShantyfileDiscoverer
- Inherits:
-
Discoverer
- Object
- Discoverer
- Shanty::ShantyfileDiscoverer
- Defined in:
- lib/shanty/discoverers/shantyfile.rb
Overview
Public: Discoverer for Shantyfiles will create a a project for every Shantyfile it finds in a directory
Note that this does not execute the Shantyfile. That happens inside the ProjectTemplate as we may have projects discovered by other discoverers that still need customisation.
Instance Attribute Summary
Attributes inherited from Discoverer
Instance Method Summary collapse
Methods inherited from Discoverer
#discover_all, inherited, #initialize
Constructor Details
This class inherits a constructor from Shanty::Discoverer
Instance Method Details
#discover ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/shanty/discoverers/shantyfile.rb', line 14 def discover Dir[File.join(env.root, '**', 'Shantyfile')].map do |path| create_project_template(File.absolute_path(File.dirname(path))) do |project_template| project_template.priority = -1 end end end |