Method: Addressable::Template#variables

Defined in:
lib/vendor/addressable/lib/addressable/template.rb

#variablesArray Also known as: keys

Returns an Array of variables used within the template pattern. The variables are listed in the Array in the order they appear within the pattern. Multiple occurrences of a variable within a pattern are not represented in this Array.

Returns:

  • (Array)

    The variables present in the template’s pattern.



487
488
489
# File 'lib/vendor/addressable/lib/addressable/template.rb', line 487

def variables
  @variables ||= ordered_variable_defaults.map { |var, val| var }.uniq
end