Class: SDL::Types::SDLUrl

Inherits:
SDLSimpleType show all
Includes:
SDLType
Defined in:
lib/sdl/types/sdl_url.rb

Instance Attribute Summary

Attributes inherited from SDLSimpleType

#raw_value, #value

Instance Method Summary collapse

Methods included from SDLType

included

Methods inherited from SDLSimpleType

#==, #initialize, #to_s

Constructor Details

This class inherits a constructor from SDL::Types::SDLSimpleType

Instance Method Details

#from_string(string_value) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/sdl/types/sdl_url.rb', line 9

def from_string(string_value)
  begin
    @value = URI.parse string_value
  rescue URI::InvalidURIError
    throw "Invalid URI: #{string_value}"
  end
end