class Marten::Routing::Reverser
- Marten::Routing::Reverser
- Reference
- Object
Overview
Represents a route reverser.
A route reverser allows to perform URL / route lookups for a given route. Such routes can optionally expect
parameters and such parameters are handled accordingly when the #reverse
method is called. The main
Marten::Routing::Map#reverse
method makes use of reverser objects internally in order to perform routes lookups.
Defined in:
marten/routing/reverser.crConstructors
Instance Method Summary
- #name : String
- #parameters : Hash(String, Marten::Routing::Parameter::Base)
- #path_for_interpolation : String
- #reverse(params : Nil | Hash(String | Symbol, Parameter::Types)) : Nil | String
Constructor Detail
def self.new(name : String, path_for_interpolation : String, parameters : Hash(String, Marten::Routing::Parameter::Base) = {} of String => Parameter::Base)
#