Skip to content

Commit 372fbb4

Browse files
committed
[DOC] Document private visibility too
For the references to URI::RFC2396_Parser private methods.
1 parent 452d743 commit 372fbb4

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.rdoc_options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ main_page: README.md
22
op_dir: _site
33
warn_missing_rdoc_ref: true
44
title: URI Documentation
5+
visibility: :private

lib/uri/common.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,11 @@ def self.scheme_list
159159
Schemes.list
160160
end
161161

162+
# :stopdoc:
162163
INITIAL_SCHEMES = scheme_list
163164
private_constant :INITIAL_SCHEMES
164165
Ractor.make_shareable(INITIAL_SCHEMES) if defined?(Ractor)
166+
# :startdoc:
165167

166168
# Returns a new object constructed from the given +scheme+, +arguments+,
167169
# and +default+:
@@ -437,6 +439,8 @@ def self.decode_uri_component(str, enc=Encoding::UTF_8)
437439
_decode_uri_component(/%\h\h/, str, enc)
438440
end
439441

442+
# Returns a string derived from the given string +str+ with
443+
# URI-encoded characters matching +regexp+ according to +table+.
440444
def self._encode_uri_component(regexp, table, str, enc)
441445
str = str.to_s.dup
442446
if str.encoding != Encoding::ASCII_8BIT
@@ -451,6 +455,8 @@ def self._encode_uri_component(regexp, table, str, enc)
451455
end
452456
private_class_method :_encode_uri_component
453457

458+
# Returns a string decoding characters matching +regexp+ from the
459+
# given \URL-encoded string +str+.
454460
def self._decode_uri_component(regexp, str, enc)
455461
raise ArgumentError, "invalid %-encoding (#{str})" if /%(?!\h\h)/.match?(str)
456462
str.b.gsub(regexp, TBLDECWWWCOMP_).force_encoding(enc)

lib/uri/rfc2396_parser.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ def initialize_regexp(pattern)
524524
ret
525525
end
526526

527+
# Returns +uri+ as-is if it is URI, or convert it to URI if it is
528+
# a String.
527529
def convert_to_uri(uri)
528530
if uri.is_a?(URI::Generic)
529531
uri

0 commit comments

Comments
 (0)