class URITemplate::URIVariable

Defined in:

uri_template/variable.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(original : String) #

[View source]

Instance Method Detail

def ==(other : URIVariable) : Bool #

[View source]
def expand(var_hash : Nil) : String #

Return the original variable if the var_hash is nil


[View source]
def expand(var_hash : VariableValueHash) : String #

Expand this variable


[View source]
def explode_expansion(name : String, value : Array) : String #

[View source]
def explode_expansion(name : String, value : Hash) : String #

[View source]
def expr : BaseExpression #

[View source]
def no_explode_expansion(name : String, value : Array | Hash) #

[View source]
def original : String #

[View source]
def parse_expression(original) : Tuple(BaseExpression, String) #

Parse variable into operator/expression struct and unsplit variable-list-string


[View source]
def parse_varlist(variable_list_str) #

Parse variable-list-string into variables with defaults, prefix and explode


[View source]
def to_s : String #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def variable_expansion(name : String, value : ScalarVariableValue, prefix : Int32 | Nil) : String #

single variable expansion for Scalar value


[View source]
def variable_names : Array(String) #

[View source]