Class: URITemplate::Colon::Token::Static
- Inherits:
-
URITemplate::Colon::Token
- Object
- URITemplate::Colon::Token
- URITemplate::Colon::Token::Static
- Includes:
- Literal
- Defined in:
- lib/uri_template/colon.rb
Constant Summary
Constant Summary
Constants included from Literal
Constants included from Token
Instance Attribute Summary
Attributes included from Literal
Instance Method Summary (collapse)
- - (Object) expand(_)
-
- (Static) initialize(str)
constructor
A new instance of Static.
- - (Object) to_r
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 (_) 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 |