mirror of
https://gitea.invidious.io/iv-org/shard-athena-negotiation.git
synced 2024-08-15 00:53:23 +00:00
Add note about strict arg
This commit is contained in:
parent
67c17734cc
commit
bee9f7b34d
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ abstract class Athena::Negotiation::AbstractNegotiator(HeaderType)
|
|||
|
||||
# Returns the best `HeaderType` type based on the provided *header* value and *priorities*.
|
||||
#
|
||||
# If *strict* is `true`, an `ANG::Exceptions::Exception` will be raised if the *header* contains an invalid value, otherwise it is ignored.
|
||||
#
|
||||
# See `Athena::Negotiation` for examples.
|
||||
def best(header : String, priorities : Indexable(String), strict : Bool = false) : HeaderType?
|
||||
raise ArgumentError.new "priorities should not be empty." if priorities.empty?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue