Class: Mida::DataType::URL
- Defined in:
- lib/mida/datatype/url.rb
Overview
URL data type Provides access to URI methods
Instance Method Summary collapse
-
#initialize(value) ⇒ URL
constructor
Raises
ArgumentError
if value not valid url.
Methods inherited from Generic
#==, #method_missing, parse, #to_s, #to_yaml
Constructor Details
#initialize(value) ⇒ URL
Raises ArgumentError
if value not valid url
14 15 16 17 18 |
# File 'lib/mida/datatype/url.rb', line 14 def initialize(value) value = ::Addressable::URI.encode(value) raise ::ArgumentError unless value =~ ::URI::DEFAULT_PARSER.regexp[:ABS_URI] @parsedValue = ::URI.parse(value) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Mida::DataType::Generic