Class: Uri

Inherits:
String show all
Defined in:
lib/xommelier/core_ext/uri.rb

Class Method Summary collapse

Methods inherited from String

#to_xommelier

Class Method Details

.from_xommelier(value) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/xommelier/core_ext/uri.rb', line 19

def self.from_xommelier(value)
  return if value.nil?
  case value
  when URI::Generic
    value
  when String
    URI.parse(value)
  else
    raise Xommelier::TypeError.new(value, Uri)
  end
end