Method: Addressable::Template#variables
- Defined in:
- lib/addressable/template.rb
#variables ⇒ Array Also known as: keys, names
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.
607 608 609 |
# File 'lib/addressable/template.rb', line 607 def variables @variables ||= ordered_variable_defaults.map { |var, val| var }.uniq end |