Class: Rails::Rack::Metal
Constant Summary collapse
- NotFoundResponse =
[404, {}, []].freeze
- NotFound =
lambda { NotFoundResponse }
Class Method Summary collapse
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Metal
constructor
A new instance of Metal.
Constructor Details
Class Method Details
.metals ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rails/rack/metal.rb', line 13 def self. matcher = /#{Regexp.escape('/app/metal/')}(.*)\.rb\Z/ = .map{ |base| "#{base}/**/*.rb" } = {} .each do |glob| Dir[glob].sort.map do |file| file = file.match(matcher)[1] [file.camelize] = file end end load_list = || .keys load_list.map do || if = [] require_dependency .constantize end end.compact end |