Class: Doze::URITemplate::String
Constant Summary
collapse
- NO_VARS =
[].freeze
Instance Attribute Summary collapse
Instance Method Summary
collapse
#+, #anchored_regexp, compile, #compile_expand!, #inspect, #match, #match_with_trailing, #parts, #start_anchored_regexp, #with_prefix
Constructor Details
#initialize(string) ⇒ String
Returns a new instance of String.
143
144
145
|
# File 'lib/doze/uri_template.rb', line 143
def initialize(string)
@string = string
end
|
Instance Attribute Details
#string ⇒ Object
Returns the value of attribute string.
141
142
143
|
# File 'lib/doze/uri_template.rb', line 141
def string
@string
end
|
Instance Method Details
#expand(vars) ⇒ Object
155
156
157
|
# File 'lib/doze/uri_template.rb', line 155
def expand(vars)
@string
end
|
#expand_code_fragment ⇒ Object
164
165
166
|
# File 'lib/doze/uri_template.rb', line 164
def expand_code_fragment
@string.inspect[1...-1]
end
|
#partially_expand(vars) ⇒ Object
159
|
# File 'lib/doze/uri_template.rb', line 159
def partially_expand(vars); self; end
|
#regexp_fragment ⇒ Object
147
148
149
|
# File 'lib/doze/uri_template.rb', line 147
def regexp_fragment
Regexp.escape(@string)
end
|
#to_s ⇒ Object
151
152
153
|
# File 'lib/doze/uri_template.rb', line 151
def to_s
@string
end
|
#variables ⇒ Object
162
|
# File 'lib/doze/uri_template.rb', line 162
def variables; NO_VARS; end
|