Skip to content

Commit 75c58bc

Browse files
committed
Documentation.
1 parent 55c88d9 commit 75c58bc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/protocol/http/header/accept.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ def split(*args)
7373
end
7474
end
7575

76+
# Parse the `accept` header value into a list of content types.
77+
#
78+
# @parameter value [String] the value of the header.
7679
def initialize(value = nil)
7780
if value
7881
super(value.scan(SEPARATOR).map(&:strip))
79-
else
8082
end
8183
end
8284

lib/protocol/http/header/quoted_string.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ module Header
1414
# https://tools.ietf.org/html/rfc7231#section-5.3.1
1515
QVALUE = /0(\.[0-9]{0,3})?|1(\.[0]{0,3})?/
1616

17+
# Handling of HTTP quoted strings.
1718
module QuotedString
18-
# Unquote a "quoted-string" value according to https://tools.ietf.org/html/rfc7230#section-3.2.6
19-
# It should already match the QUOTED_STRING pattern above by the parser.
19+
# Unquote a "quoted-string" value according to <https://tools.ietf.org/html/rfc7230#section-3.2.6>. It should already match the QUOTED_STRING pattern above by the parser.
2020
def self.unquote(value, normalize_whitespace = true)
2121
value = value[1...-1]
2222

0 commit comments

Comments
 (0)