module Controller
A middleware which loads controller classes and invokes functionality based on the requested path.
Classes and Modules
module ActionsA controller layer which invokes functinality based on the request path.
class BaseThe base implementation of a controller class.
class Middleware < Protocol::HTTP::MiddlewareDispatches requests to filesystem-backed controller classes.
module RespondA controller layer which provides a convenient way to respond to different requested content types. The order in which you add converters matters, as it determines how the incoming Accept: header is mapped, e.g. the first converter is also defined as matching the media range /.
class ResponderNegotiates response content types and invokes the matching handler.
module RewriteThis controller layer rewrites the path before executing controller actions. When the rule matches, the supplied block is executed.
class VariablesProvides a stack-based instance variable lookup mechanism. It can flatten a stack of controllers into a single hash.
Definitions
Result = Data.define(:status, :headers, :value)
A semantic controller result awaiting response negotiation.
def self.[](request)
Return the controller variables associated with the request.
Signature
-
parameter
requestUtopia::Request The application request.
-
returns
Variables | Nil The current variables.
Implementation
def self.[] request
request.variables
end
def self.new(...)
Construct controller middleware.
Signature
-
returns
Controller::Middleware The controller middleware.
Implementation
def self.new(...)
Middleware.new(...)
end