Padrino::Application
Class: Padrino::Application
- Inherits:
- Sinatra::Base
- Object
- Sinatra::Base
- Padrino::Application
Overview
Subclasses of this become independent Padrino applications (stemming from Sinatra::Application). These subclassed applications can be easily mounted into other Padrino applications as well.
Class Method Summary
-
.default(option, *args, &block) ⇒ Object
-
.dependencies ⇒ Array
Returns default list of path globs to load as dependencies. -
.layout_path(layout) ⇒ Object
Returns an absolute path of application layout. -
.prerequisites ⇒ Object
An array of file to load before your app.rb, basically are files which our app depends on. -
.reload! ⇒ TrueClass
Reloads the application files from all defined load paths. -
.reset_routes! ⇒ TrueClass
Resets application routes to only routes not defined by the user. -
.routes ⇒ Object
Returns the routes of our app. -
.run!(options = {}) ⇒ Object
Run the Padrino app as a self-hosted server using Thin, Mongrel or WEBrick (in that order). -
.view_path(view) ⇒ Object
Returns an absolute path of view in application views folder.
Instance Method Summary
-
#logger ⇒ Padrino::Logger
Returns the logger for this application.
Class Method Details
.default(option, *args, &block) ⇒ Object
.dependencies ⇒ Array
Returns default list of path globs to load as dependencies. Appends custom dependency patterns to the be loaded for your Application.
.layout_path(layout) ⇒ Object
Returns an absolute path of application layout.
.prerequisites ⇒ Object
An array of file to load before your app.rb, basically are files which our app depends on.
By default we look for files:
# List of default files that we are looking for: yourapp/models.rb yourapp/models/**/*.rb yourapp/lib.rb yourapp/lib/**/*.rb
.reload! ⇒ TrueClass
Reloads the application files from all defined load paths.
This method is used from our Padrino Reloader during development mode in order to reload the source files.
.reset_routes! ⇒ TrueClass
Resets application routes to only routes not defined by the user.
.routes ⇒ Object
Returns the routes of our app.
.run!(options = {}) ⇒ Object
Run the Padrino app as a self-hosted server using Thin, Mongrel or WEBrick (in that order).
.view_path(view) ⇒ Object
Returns an absolute path of view in application views folder.
Instance Method Details
#logger ⇒ Padrino::Logger
Returns the logger for this application.
© 2010–2016 Padrino
Licensed under the MIT License.
http://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Application