Module: Rsodx::Boot
- Defined in:
- lib/rsodx/boot.rb
Class Method Summary collapse
Class Method Details
.load_app_structure(app_root) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/rsodx/boot.rb', line 3 def self.load_app_structure(app_root) %w[models controllers services serializers presenters].each do |folder| path = File.join(app_root, "app", folder) $LOAD_PATH.unshift(path) if Dir.exist?(path) Dir["#{path}/*.rb"].sort.each { |file| require file } Dir["#{path}/**/*.rb"].sort.each { |file| require file } end end |