struct Athena::Routing::CompiledRoute::Token
inherits Struct
#
An immutable representation of a segment of a route used to reconstruct a valid URL from an ART::CompiledRoute.
Constructors#
.new(type : Type, prefix : String, regex : Regex | Nil = nil, var_name : String | Nil = nil, important : Bool = false)#
Methods#
#important? : Bool#
Returns true if this token should always be included within the generated URL, otherwise false.
#regex : Regex | ::Nil#
Returns the pattern this ART::CompiledRoute::Token::Type::VARIABLE token requires.
#var_name : String | ::Nil#
Returns the name of parameter this ART::CompiledRoute::Token::Type::VARIABLE token represents.