Class: KDL::Types::URLTemplate
- Inherits:
-
Value::Custom
- Object
- Value
- Value::Custom
- 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::Custom
Attributes inherited from Value
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Value::Custom
Methods inherited from Value
#==, #as_type, from, #initialize, #inspect, #method_missing, #respond_to_missing?, #stringify_value, #to_s, #to_v2, #version
Constructor Details
This class inherits a constructor from KDL::Value
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class KDL::Value
Class Method Details
Instance Method Details
#expand(variables) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/kdl/types/url_template.rb', line 18 def (variables) result = value.map { |v| v.(variables) }.join parser = IRLReference::Parser.new(result) uri, * = parser.parse URI(uri) end |