#after_load { ... } ⇒ Array<Proc>
Hooks to be called after a load/reload. #before_load { ... } ⇒ Array<Proc>
Hooks to be called before a load/reload. #called_from ⇒ Object
This adds the ability to instantiate load! after Application definition. #clear! ⇒ NilClass
Clear the padrino env. #dependency_paths ⇒ Array<String>
Returns default list of path globs to load as dependencies. #load! ⇒ Boolean
Requires necessary dependencies as well as application files from root lib and models. #loaded? ⇒ Boolean
Determines whether Padrino was loaded with load!. #precompile_all_routes! ⇒ Object
Precompiles all routes if :precompile_routes is set to true. #reload! ⇒ Object
Method for reloading required applications and their files. #require_dependencies(*paths) ⇒ Object
Attempts to require all dependency libs that we need. Hooks to be called after a load/reload.
Hooks to be called before a load/reload.
This adds the ability to instantiate Padrino.load! after Application definition.
Clear the padrino env.
Returns default list of path globs to load as dependencies. Appends custom dependency patterns to the be loaded for Padrino.
Requires necessary dependencies as well as application files from root lib and models.
Determines whether Padrino was loaded with Padrino.load!.
Precompiles all routes if :precompile_routes is set to true
Method for reloading required applications and their files.
Attempts to require all dependency libs that we need. If you use this method we can perform correctly a Padrino.reload! Another good thing that this method are dependency check, for example:
# models # \-- a.rb => require something of b.rb # \-- b.rb
In the example above if we do:
Dir["/models/*.rb"].each { |r| require r }
We get an error, because we try to require first a.rb
that need something of b.rb
.
With this method we don't have this problem.
© 2010–2019 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Loader