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