Class: URITemplate::Colon::Token::Static

Inherits:
URITemplate::Colon::Token show all
Includes:
Literal
Defined in:
lib/uri_template/colon.rb

Constant Summary

Constant Summary

Constants included from Literal

Literal::SLASH

Constants included from Token

Token::EMPTY_ARRAY

Instance Attribute Summary

Attributes included from Literal

#string

Instance Method Summary (collapse)

Methods included from Literal

#ends_with_slash?, #expression?, #literal?, #size, #starts_with_slash?

Methods included from Token

#ends_with_slash?, #host?, #scheme?, #size, #starts_with_slash?, #to_s, #variables

Constructor Details

- (Static) initialize(str)

A new instance of Static



120
121
122
# File 'lib/uri_template/colon.rb', line 120

def initialize(str)
  @string = str
end

Instance Method Details

- (Object) expand(_)



124
125
126
# File 'lib/uri_template/colon.rb', line 124

def expand(_)
  return @string
end

- (Object) to_r



128
129
130
# File 'lib/uri_template/colon.rb', line 128

def to_r
  return Regexp.escape(@string)
end