Skip to content

Commit 5fc45d1

Browse files
authored
Fix some typos in the docs (#5)
1 parent 9e2579d commit 5fc45d1

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/abstract_negotiator.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ abstract class Athena::Negotiation::AbstractNegotiator(HeaderType)
99
end
1010
end
1111

12-
# Returns the best `HeaderType` type based on the provided *header* value and *priorities*.
12+
# Returns the best `HeaderType` based on the provided *header* value and *priorities*.
1313
#
1414
# If *strict* is `true`, an `ANG::Exceptions::Exception` will be raised if the *header* contains an invalid value, otherwise it is ignored.
1515
#
@@ -41,7 +41,7 @@ abstract class Athena::Negotiation::AbstractNegotiator(HeaderType)
4141
match.nil? ? nil : accepted_priorties[match.index]
4242
end
4343

44-
# Returns an array of `HeaderType` types that the provided *header* allows, ordered so that the `#best` match is first.
44+
# Returns an array of `HeaderType` that the provided *header* allows, ordered so that the `#best` match is first.
4545
#
4646
# ```
4747
# header = "text/*;q=0.3, text/html;q=0.7, text/html;level=1, text/html;level=2;q=0.4, */*;q=0.5"

src/accept.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require "./base_accept"
55
# ```
66
# accept = ANG::Accept.new "application/json; q = 0.75; charset = UTF-8"
77
#
8-
# accept.header # => "application/json; q = 0.9; charset = UTF-8"
8+
# accept.header # => "application/json; q = 0.75; charset = UTF-8"
99
# accept.normalized_header # => "application/json; charset=UTF-8"
1010
# accept.parameters # => {"charset" => "UTF-8"}
1111
# accept.quality # => 0.75

src/accept_encoding.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ require "./base_accept"
55
# ```
66
# accept = ANG::AcceptEncoding.new "gzip; q = 0.5; key=value"
77
#
8-
# accept.header # => "gzip-1; q = 0.5; key=value"
9-
# accept.normalized_header # => "gzip-1; key=value"
8+
# accept.header # => "gzip; q = 0.5; key=value"
9+
# accept.normalized_header # => "gzip; key=value"
1010
# accept.parameters # => {"key" => "value"}
1111
# accept.quality # => 0.5
1212
# accept.coding # => "gzip"

src/accept_language.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ struct Athena::Negotiation::AcceptLanguage < Athena::Negotiation::BaseAccept
1919
getter language : String
2020

2121
# Returns the region, if any, for this `AcceptLanguage` header.
22-
# E.x. if the `#language_range` is `zh-Hans-CN`, the language would be `cn`
22+
# E.x. if the `#language_range` is `zh-Hans-CN`, the region would be `cn`
2323
getter region : String? = nil
2424

2525
# Returns the script, if any, for this `AcceptLanguage` header.
26-
# E.x. if the `#language_range` is `zh-Hans-CN`, the language would be `hans`
26+
# E.x. if the `#language_range` is `zh-Hans-CN`, the script would be `hans`
2727
getter script : String? = nil
2828

2929
def initialize(value : String)

src/base_accept.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Base type for properties/logic all [Accept*](https://tools.ietf.org/html/rfc7231#section-5.3) headers share.
22
abstract struct Athena::Negotiation::BaseAccept
33
# Returns the full unaltered header `self` represents.
4-
# E.x. `text/html` or `unicode-1-1;q=0.8` or `zh-Hans-CN`.
4+
# E.x. `text/html`, `unicode-1-1;q=0.8`, or `zh-Hans-CN`.
55
getter header : String
66

77
# Returns a normalized version of the `#header`, excluding the `#quality` parameter.

0 commit comments

Comments
 (0)