Add note about strict arg

This commit is contained in:
George Dietrich 2020-12-24 10:11:41 -05:00
parent 67c17734cc
commit bee9f7b34d

View file

@ -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?