module URITemplate::Token

This should make it possible to do basic analysis independently from the concrete type. Usually the submodules {URITemplate::Literal} and {URITemplate::Expression} are used.

@abstract

Constants

EMPTY_ARRAY

Public Instance Methods

ends_with_slash?() click to toggle source
# File lib/uri_template/token.rb, line 47
def ends_with_slash?
  false
end
expand(variables) click to toggle source

@abstract

# File lib/uri_template/token.rb, line 60
def expand(variables)
  raise "Please implement #expand(variables) on #{self.class.inspect}."
end
expand_partial(variables) click to toggle source

@abstract

# File lib/uri_template/token.rb, line 65
def expand_partial(variables)
  raise "Please implement #expand_partial(variables) on #{self.class.inspect}."
end
host?() click to toggle source
# File lib/uri_template/token.rb, line 55
def host?
  false
end
scheme?() click to toggle source
# File lib/uri_template/token.rb, line 51
def scheme?
  false
end
size() click to toggle source

Number of variables in this token

# File lib/uri_template/token.rb, line 39
def size
  variables.size
end
starts_with_slash?() click to toggle source
# File lib/uri_template/token.rb, line 43
def starts_with_slash?
  false
end
to_s() click to toggle source

@abstract

# File lib/uri_template/token.rb, line 70
def to_s
  raise "Please implement #to_s on #{self.class.inspect}."
end
variables() click to toggle source

The variable names used in this token.

@return [Array<String>]

# File lib/uri_template/token.rb, line 34
def variables
  EMPTY_ARRAY
end