Class: Mida::DataType::URL

Inherits:
Generic
  • Object
show all
Defined in:
lib/mida/datatype/url.rb

Overview

URL data type Provides access to URI methods

Instance Method Summary collapse

Methods inherited from Generic

#==, #method_missing, parse, #to_s, #to_yaml

Constructor Details

#initialize(value) ⇒ URL

Raises ArgumentError if value not valid url

Raises:

  • (::ArgumentError)


12
13
14
15
# File 'lib/mida/datatype/url.rb', line 12

def initialize(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