module Cas module Client class URL def initialize(url) begin @url = URI(url) rescue URI::Error => e raise e end end def append_path(path_string) Cas::Client::URL.new("#{@url}#{path_string}") end def add_query(query_string) if @url.query.nil? @url.query = query_string else @url.query += "&#{query_string}" end @url end def to_uri URI(@url.to_s) end def to_s @url.to_s end end end end