Skip to content

Commit 4c2e6b9

Browse files
authored
Fix typo (#3)
* Fix typo * Add note about strict arg
1 parent 96fe929 commit 4c2e6b9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/abstract_negotiator.cr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ abstract class Athena::Negotiation::AbstractNegotiator(HeaderType)
1111

1212
# Returns the best `HeaderType` type based on the provided *header* value and *priorities*.
1313
#
14+
# If *strict* is `true`, an `ANG::Exceptions::Exception` will be raised if the *header* contains an invalid value, otherwise it is ignored.
15+
#
1416
# See `Athena::Negotiation` for examples.
1517
def best(header : String, priorities : Indexable(String), strict : Bool = false) : HeaderType?
1618
raise ArgumentError.new "priorities should not be empty." if priorities.empty?

src/athena-negotiation.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ alias ANG = Athena::Negotiation
6767
# accept.coding # => "gzip"
6868
# ```
6969
#
70-
# The `ANG::EncodingNegotiator` type returns an `ANG::AcceptEncoding`, or `nil` if negotiating the best character set has failed.
70+
# The `ANG::EncodingNegotiator` type returns an `ANG::AcceptEncoding`, or `nil` if negotiating the best encoding has failed.
7171
#
7272
# ### Language
7373
#
@@ -84,7 +84,7 @@ alias ANG = Athena::Negotiation
8484
# accept.script # => "hans"
8585
# ```
8686
#
87-
# The `ANG::LanguageNegotiator` type returns an `ANG::AcceptLanguage`, or `nil` if negotiating the best character set has failed.
87+
# The `ANG::LanguageNegotiator` type returns an `ANG::AcceptLanguage`, or `nil` if negotiating the best language has failed.
8888
module Athena::Negotiation
8989
# Returns a lazily initialized `ANG::Negotiator` singleton instance.
9090
class_getter(negotiator) { ANG::Negotiator.new }

0 commit comments

Comments
 (0)