Class: KDL::Types::URLTemplate
- Defined in:
- lib/kdl/types/url_template.rb
Defined Under Namespace
Classes: FragmentExpansion, LabelExpansion, ParameterExpansion, Parser, Part, PathExpansion, QueryContinuation, QueryExpansion, ReservedExpansion, StringExpansion, StringLiteral, Variable
Constant Summary collapse
- UNRESERVED =
/[a-zA-Z0-9\-._~]/.freeze
- RESERVED =
%r{[:/?#\[\]@!$&'()*+,;=]}.freeze
Constants inherited from Value
Instance Attribute Summary
Attributes inherited from Value
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Value
#as_type, from, #initialize, #stringify_value, #to_s
Constructor Details
This class inherits a constructor from KDL::Value
Class Method Details
Instance Method Details
#expand(variables) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/kdl/types/url_template.rb', line 16 def (variables) result = value.map { |v| v.(variables) }.join parser = IRLReference::Parser.new(result) uri, * = parser.parse URI(uri) end |