Method: Module#include_project_level_helpers
- Defined in:
- lib/terraspace/ext/core/module.rb
#include_project_level_helpers ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/terraspace/ext/core/module.rb', line 20 def include_project_level_helpers full_dir = "#{Terraspace.root}/config/helpers" Dir.glob("#{full_dir}/**/*").each do |path| regexp = Regexp.new(".*/config/helpers/") klass = path.sub(regexp, '').sub('.rb','').camelize klass = "Terraspace::Project::#{klass}" include klass.constantize end end |