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
Constants included from Literal
Constants included from Token
Instance Attribute Summary
Attributes included from Literal
Instance Method Summary collapse
- #expand(_) ⇒ Object
-
#initialize(str) ⇒ Static
constructor
A new instance of Static.
- #to_r ⇒ Object
Methods included from Literal
#ends_with_slash?, #expand_partial, #expression?, #literal?, #size, #starts_with_slash?
Methods included from Token
#ends_with_slash?, #expand_partial, #host?, #scheme?, #size, #starts_with_slash?, #to_s, #variables
Constructor Details
#initialize(str) ⇒ Static
Returns a new instance of Static.
126 127 128 |
# File 'lib/uri_template/colon.rb', line 126 def initialize(str) @string = str end |
Instance Method Details
#expand(_) ⇒ Object
130 131 132 |
# File 'lib/uri_template/colon.rb', line 130 def (_) return @string end |
#to_r ⇒ Object
134 135 136 |
# File 'lib/uri_template/colon.rb', line 134 def to_r return Regexp.escape(@string) end |