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