Sha256: 71c809aea20c6facce7a8a145057dc251bfb9c3330f562fc9687f10d5e4f69b6

Contents?: true

Size: 256 Bytes

Versions: 20

Compression:

Stored size: 256 Bytes

Contents

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)
    if value.is_a?(URI::Generic)
      value
    else
      URI.parse(value)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
xommelier-0.1.19 lib/xommelier/core_ext/uri.rb
xommelier-0.1.18 lib/xommelier/core_ext/uri.rb
xommelier-0.1.16 lib/xommelier/core_ext/uri.rb
xommelier-0.1.15 lib/xommelier/core_ext/uri.rb
xommelier-0.1.14 lib/xommelier/core_ext/uri.rb
xommelier-0.1.13 lib/xommelier/core_ext/uri.rb
xommelier-0.1.12 lib/xommelier/core_ext/uri.rb
xommelier-0.1.11 lib/xommelier/core_ext/uri.rb
xommelier-0.1.10 lib/xommelier/core_ext/uri.rb
xommelier-0.1.9 lib/xommelier/core_ext/uri.rb
xommelier-0.1.8 lib/xommelier/core_ext/uri.rb
xommelier-0.1.7 lib/xommelier/core_ext/uri.rb
xommelier-0.1.6 lib/xommelier/core_ext/uri.rb
xommelier-0.1.5 lib/xommelier/core_ext/uri.rb
xommelier-0.1.4 lib/xommelier/core_ext/uri.rb
xommelier-0.1.3 lib/xommelier/core_ext/uri.rb
xommelier-0.1.2 lib/xommelier/core_ext/uri.rb
xommelier-0.1.1 lib/xommelier/core_ext/uri.rb
xommelier-0.1.0 lib/xommelier/core_ext/uri.rb
xommelier-0.0.2 lib/xommelier/core_ext/uri.rb