Sha256: 20ceb7fd5be3565091a884c375a68699631aae37b39b86451c4b5ae3436ba515
Contents?: true
Size: 601 Bytes
Versions: 1
Compression:
Stored size: 601 Bytes
Contents
# frozen_string_literal: true ################################################ # © Alexander Semyonov, 2011—2013, MIT License # # Author: Alexander Semyonov <al@semyonov.us> # ################################################ require 'xommelier' require 'xommelier/core_ext/string' require 'uri' class URI::Generic def to_xommelier to_s end end class Uri < String 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xommelier-0.1.35 | lib/xommelier/core_ext/uri.rb |