method
merge0
v1_8_7_72 -
Show latest stable
- Class:
URI::Generic
merge0(oth)private
return base and rel. you can modify `base’, but can not `rel’.
# File lib/uri/generic.rb, line 771
def merge0(oth)
case oth
when Generic
when String
oth = URI.parse(oth)
else
raise ArgumentError,
"bad argument(expected URI object or URI string)"
end
if self.relative? && oth.relative?
raise BadURIError,
"both URI are relative"
end
if self.absolute? && oth.absolute?
#raise BadURIError,
# "both URI are absolute"
# hmm... should return oth for usability?
return oth, oth
end
if self.absolute?
return self.dup, oth
else
return oth, oth
end
end Related methods
- Instance methods
- +
- -
- ==
- absolute
- absolute?
- coerce
- component
- default_port
- eql?
- find_proxy
- fragment=
- hash
- hierarchical?
- host=
- inspect
- merge
- merge!
- normalize
- normalize!
- opaque=
- password
- password=
- path=
- port=
- query=
- registry=
- relative?
- route_from
- route_to
- scheme=
- select
- to_s
- user
- user=
- userinfo
- userinfo=
- Class methods
- build
- build2
- component
- default_port
- new
- use_registry
- Protected methods
-
component_ary -
set_fragment -
set_host -
set_opaque -
set_password -
set_path -
set_port -
set_query -
set_registry -
set_scheme -
set_user -
set_userinfo - Private methods
-
check_fragment -
check_host -
check_opaque -
check_password -
check_path -
check_port -
check_query -
check_registry -
check_scheme -
check_user -
check_userinfo -
escape_userpass -
merge0 -
merge_path -
path_query -
replace! -
route_from0 -
route_from_path -
split_path -
split_userinfo