URITemplate::Template
Inherits Reference < Object
Constructors
new(uri : String)
SourceClass methods
parse(str : String) : Array(String | URIVariable)
Parse the template, looking for bracketed expressions. In a quick survey of other implementations, many seem to use Regex's to parse the template, however it's hard to pinpoint errors in the input template using Regex ("do or do not, there is no try").
Instance methods
expand(var_hash : VariableValueHash | Nil = nil, **kwargs) : String
Expand the URI with the +var_hash+, keyword arguments a mix of the two. Complete expansions return a String.
expand_partial(var_hash : VariableValueHash | Nil = nil, **kwargs) : Template
Partial expansions should return another Template object.