class method
self.metals
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
self.metals()
No documentation comment.
Source
# File railties/lib/rails/rack/metal.rb, line 13
def self.metals
matcher = /#{Regexp.escape('/app/metal/')}(.*)\.rb\Z/
metal_glob = metal_paths.map{ |base| "#{base}/**/*.rb" }
all_metals = {}
metal_glob.each do |glob|
Dir[glob].sort.map do |file|
file = file.match(matcher)[1]
all_metals[file.camelize] = file
end
end
load_list = requested_metals || all_metals.keys
load_list.map do |requested_metal|
if metal = all_metals[requested_metal]
require_dependency metal
requested_metal.constantize
end
end.compact
end
Defined in railties/lib/rails/rack/metal.rb line 13
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Rack::Metal