Sha256: d49d9193fda13adfbe749ee22174aa6e364376520bcf5d686ce6fc35dcaeb489

Contents?: true

Size: 510 Bytes

Versions: 38

Compression:

Stored size: 510 Bytes

Contents

require 'orange-core/middleware/base'
module Orange::Middleware
  class Loader < Base
    def init(*args)
      Dir.glob(File.join(orange.app_dir, 'resources', '*.rb')).each do |f| 
        require f 
        orange.load Orange::Inflector.constantize(Orange::Inflector.camelize(File.basename(f, '.rb'))).new
      end
      Dir.glob(File.join(orange.app_dir, 'cartons', '*.rb')).each { |f|  require f }
      Dir.glob(File.join(orange.app_dir, 'middleware', '*.rb')).each { |f|  require f }
    end
  end  
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
orange-core-0.7.0 lib/orange-core/middleware/loader.rb
orange-core-0.6.0 lib/orange-core/middleware/loader.rb
orange-core-0.5.9 lib/orange-core/middleware/loader.rb
orange-core-0.5.8 lib/orange-core/middleware/loader.rb
orange-core-0.5.5 lib/orange-core/middleware/loader.rb
orange-core-0.5.3 lib/orange-core/middleware/loader.rb
orange-0.5.5 lib/orange-core/middleware/loader.rb
orange-0.5.4 lib/orange-core/middleware/loader.rb
orange-0.5.3 lib/orange-core/middleware/loader.rb
orange-0.5.2 lib/orange-core/middleware/loader.rb
orange-0.5.1 lib/orange-core/middleware/loader.rb
orange-0.4.0 lib/orange-core/middleware/loader.rb
orange-0.3.9 lib/orange-core/middleware/loader.rb
orange-0.3.8 lib/orange-core/middleware/loader.rb
orange-0.3.7 lib/orange-core/middleware/loader.rb
orange-0.3.6 lib/orange-core/middleware/loader.rb
orange-0.3.5 lib/orange-core/middleware/loader.rb
orange-0.3.4 lib/orange-core/middleware/loader.rb
orange-0.3.3 lib/orange-core/middleware/loader.rb
orange-0.3.2 lib/orange-core/middleware/loader.rb