Sha256: 9feeb0b2504c32b33db7ab75847d6d736756d6165041ebd90eeda1b9cfb88c6c

Contents?: true

Size: 410 Bytes

Versions: 6

Compression:

Stored size: 410 Bytes

Contents

require 'mida_vocabulary/datatype/generic'
require 'uri'

module Mida
  module DataType

    # URL data type
    # Provides access to URI methods
    class URL < Generic

      # Raises +ArgumentError+ if value not valid url
      def initialize(value)
        raise ::ArgumentError unless value =~ ::URI::DEFAULT_PARSER.regexp[:ABS_URI]
        @parsedValue = ::URI.parse(value)
      end

    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mida_vocabulary-0.2.2 lib/mida_vocabulary/datatype/url.rb
mida_vocabulary-0.2 lib/mida_vocabulary/datatype/url.rb
mida_vocabulary-0.1.3 lib/mida_vocabulary/datatype/url.rb
mida_vocabulary-0.1.2 lib/mida_vocabulary/datatype/url.rb
mida_vocabulary-0.1.1 lib/mida_vocabulary/datatype/url.rb
mida_vocabulary-0.1 lib/mida_vocabulary/datatype/url.rb