Class: KDL::Types::URL
- Inherits:
-
URLReference
- Object
- Value
- Value::Custom
- URLReference
- KDL::Types::URL
- Defined in:
- lib/kdl/types/url.rb
Constant Summary
Constants inherited from Value
Instance Attribute Summary
Attributes inherited from Value::Custom
Attributes inherited from Value
Class 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
.call(value, type = 'url') ⇒ Object
20 21 22 |
# File 'lib/kdl/types/url.rb', line 20 def self.call(value, type = 'url') super(value, type) end |
.parse_url(string) ⇒ Object
24 25 26 27 28 |
# File 'lib/kdl/types/url.rb', line 24 def self.parse_url(string) super.tap do |uri| raise 'invalid URL' if uri.scheme.nil? end end |