class Addressable::Template::MatchData

is matched against a URI.
This class represents the data that is extracted when a Template
#

def initialize(uri, template, mapping)

Parameters:
  • uri (Addressable::URI) --
def initialize(uri, template, mapping)
  @uri = uri.dup.freeze
  @template = template
  @mapping = mapping.dup.freeze
end

def inspect

Returns:
  • (String) - The MatchData's state, as a String.
def inspect
  sprintf("#<%s:%#0x RESULT:%s>",
    self.class.to_s, self.object_id, self.mapping.inspect)
end

def values

Returns:
  • (Array) -
def values
  @values ||= self.variables.inject([]) do |accu, key|
    accu << self.mapping[key]
    accu
  end
end

def variables

Returns:
  • (Array) -
def variables
  self.template.variables
end