Padrino::Routing::InstanceMethods
Module: Padrino::Routing::InstanceMethods
Overview
Instance methods related to recognizing and processing routes and serving static files.
Instance Method Summary
-
#absolute_url(*args) ⇒ Object
Returns absolute url. -
#content_type(type = nil, params = {}) ⇒ Object
Return the request format, this is useful when we need to respond to a given Content-Type. -
#current_path(*path_params) ⇒ Object
Returns the current path within a route from specifiedpath_params
. -
#recognize_path(path) ⇒ Object
-
#route ⇒ Object
Returns the current route. -
#static!(options = {}) ⇒ Object
Method for deliver static files. -
#static_file?(path_info) ⇒ Boolean
This is mostly just a helper so request.path_info isn't changed when serving files from the public directory. -
#url(*args) ⇒ Object (also: #url_for)
Instance method for URL generation.
Instance Method Details
#absolute_url(*args) ⇒ Object
Returns absolute url. Calls Sinatra::Helpers#uri to generate protocol version, hostname and port.
#content_type(type = nil, params = {}) ⇒ Object
Return the request format, this is useful when we need to respond to a given Content-Type.
#current_path(*path_params) ⇒ Object
Returns the current path within a route from specified path_params
.
#recognize_path(path) ⇒ Object
#route ⇒ Object
Returns the current route
#static!(options = {}) ⇒ Object
Method for deliver static files.
#static_file?(path_info) ⇒ Boolean
This is mostly just a helper so request.path_info isn't changed when serving files from the public directory.
#url(*args) ⇒ Object Also known as: url_for
Instance method for URL generation.
© 2010–2016 Padrino
Licensed under the MIT License.
http://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Routing/InstanceMethods