class URI::HTTP

Constants

REGEX

Public Class Methods

new(url) click to toggle source
# File lib/uri.rb, line 7
def initialize(url)
  @url = url
  uri_match = url.match(REGEX).to_a
  @scheme = uri_match[1]
  @host = uri_match[2]
  @path = uri_match[3]
  @query = uri_match[4]
  # TODO fragment
end

Public Instance Methods

to_s() click to toggle source
# File lib/uri.rb, line 17
def to_s
  url
end