Class: Padrino::Mounter
Overview
Represents a particular mounted Padrino application. Stores the name of the application (app folder name) and url mount path.
Defined Under Namespace
Modules: ApplicationExtension Classes: MounterException
Constant Summary collapse
- DEFAULT_CASCADE =
[404, 405]
Instance Attribute Summary
-
#app_class ⇒ Object
Returns the value of attribute app_class. -
#app_file ⇒ Object
Returns the value of attribute app_file. -
#app_host ⇒ Object
Returns the value of attribute app_host. -
#app_obj ⇒ Object
Returns the value of attribute app_obj. -
#app_root ⇒ Object
Returns the value of attribute app_root. -
#cascade ⇒ Object
Returns the value of attribute cascade. -
#name ⇒ Object
Returns the value of attribute name. -
#uri_root ⇒ Object
Returns the value of attribute uri_root.
Instance Method Summary
-
#==(other) ⇒ Object
Makes two Mounters equal if they have the same name and uri_root. -
#app_constant ⇒ Padrino::Application
The class object for the app if defined, nil otherwise. -
#host(mount_host) ⇒ Object
Registers the mounted application onto Padrino for the given host. -
#initialize(name, options = {}) ⇒ Mounter
constructor A new instance of Mounter. -
#map_onto(router) ⇒ Padrino::Router
Maps Padrino application onto a Padrino::Router. -
#named_routes ⇒ Array
Returns the basic route information for each named route. -
#padrino_application? ⇒ Boolean
-
#routes ⇒ Object
Returns the route objects for the mounted application. -
#to(mount_url) ⇒ Object
Registers the mounted application onto Padrino.
Constructor Details
#initialize(name, options = {}) ⇒ Mounter
Returns a new instance of Mounter.
Instance Attribute Details
#app_class ⇒ Object
Returns the value of attribute app_class
#app_file ⇒ Object
Returns the value of attribute app_file
#app_host ⇒ Object
Returns the value of attribute app_host
#app_obj ⇒ Object
Returns the value of attribute app_obj
#app_root ⇒ Object
Returns the value of attribute app_root
#cascade ⇒ Object
Returns the value of attribute cascade
#name ⇒ Object
Returns the value of attribute name
#uri_root ⇒ Object
Returns the value of attribute uri_root
Instance Method Details
#==(other) ⇒ Object
Makes two Mounters equal if they have the same name and uri_root.
#app_constant ⇒ Padrino::Application
Returns the class object for the app if defined, nil otherwise.
#host(mount_host) ⇒ Object
Registers the mounted application onto Padrino for the given host.
#map_onto(router) ⇒ Padrino::Router
Maps Padrino application onto a Padrino::Router. For use in constructing a Rack application.
#named_routes ⇒ Array
Returns the basic route information for each named route.
#padrino_application? ⇒ Boolean
#routes ⇒ Object
Returns the route objects for the mounted application.
#to(mount_url) ⇒ Object
Registers the mounted application onto Padrino.
© 2010–2020 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Mounter