Class: Payload::RailsLoader
- Inherits:
-
Object
- Object
- Payload::RailsLoader
- Defined in:
- lib/payload/rails_loader.rb
Overview
Loads dependencies from config/dependencies.rb in Rails applications.
Used by Railtie to provide a Rails dependency loader to RackContainer.
Class Method Summary collapse
-
.load ⇒ Container
Load dependencies from outside a Rails request.
- .to_proc ⇒ Object private
Instance Method Summary collapse
- #load ⇒ Object private
Class Method Details
.load ⇒ Container
Load dependencies from outside a Rails request.
19 20 21 |
# File 'lib/payload/rails_loader.rb', line 19 def self.load new.load end |
.to_proc ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/payload/rails_loader.rb', line 11 def self.to_proc lambda { load } end |
Instance Method Details
#load ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 27 28 |
# File 'lib/payload/rails_loader.rb', line 24 def load namespace_containers.inject(root_container) do |target, source| target.import(source.exports) end end |