struct

Athena::Routing::CompiledRoute::Token

Inherits Struct < Value < Object

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)
Source

Instance methods

clone

Returns a copy of self with all instance variables cloned.

Source
important?

Returns true if this token should always be included within the generated URL, otherwise false.

Source
prefix

Returns that static prefix related to this token.

Source
regex

Returns the pattern this ART::CompiledRoute::Token::Type::VARIABLE token requires.

Source
type

Returns the type this token represents.

Source
var_name

Returns the name of parameter this ART::CompiledRoute::Token::Type::VARIABLE token represents.

Source

Nested types