module URI

Constants

InvalidURIError

Public Class Methods

===(other) click to toggle source
# File lib/hub/speedy_stdlib.rb, line 53
def self.===(other)
  other.respond_to?(:host)
end
encode_www_form(params) click to toggle source
# File lib/hub/speedy_stdlib.rb, line 42
def self.encode_www_form(params)
  params.map { |k, v|
    if v.class == Array
      encode_www_form(v.map { |x| [k, x] })
    else
      ek = CGI.escape(k)
      v.nil? ? ek : "#{ek}=#{CGI.escape(v)}"
    end
  }.join("&")
end
parse(str) click to toggle source
# File lib/hub/speedy_stdlib.rb, line 38
def self.parse(str)
  URI::HTTP.new(str)
end