Athena::Routing::Generator::URLGenerator
Inherits Athena::Routing::Generator::ConfigurableRequirementsInterface < Athena::Routing::Generator::Interface < Athena::Routing::RequestContextAwareInterface < Reference < Object
Default implementation of ART::Generator::Interface.
Constructors
Instance methods
generate(route : String, params : Hash = Hash(String, String | ::Nil).new, reference_type : ART::Generator::ReferenceType = :absolute_path) : String
Generates a URL for the provided route, optionally with the provided params and reference_type.
generate(route : String, reference_type : ART::Generator::ReferenceType = :absolute_path, **params) : String
Generates a URL for the provided route, optionally with the provided params and reference_type.
Sets how invalid parameters should be treated:
true- Raise an exception for mismatched requirements.false- Do not raise an exception, but return an empty string.nil- Disables checks, returning a URL with possibly invalid parameters.