Sha256: a59e70a62f8cf57eff9b5532efac3725b788b7f854d2a490ad580ecac9ef5b18
Contents?: true
Size: 505 Bytes
Versions: 7
Compression:
Stored size: 505 Bytes
Contents
require 'orange/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
7 entries across 7 versions & 1 rubygems