abstract struct Athena::Negotiation::BaseAccept
- Athena::Negotiation::BaseAccept
- Struct
- Value
- Object
Overview
Base type for properties/logic all Accept* headers share.
Direct Known Subclasses
- Athena::Negotiation::Accept
- Athena::Negotiation::AcceptCharset
- Athena::Negotiation::AcceptEncoding
- Athena::Negotiation::AcceptLanguage
Defined in:
base_accept.crConstructors
Instance Method Summary
-
#header : String
Returns the full unaltered header
self
represents. - #normalized_header : String
-
#parameters : Hash(String, String)
Returns any extension parameters included in the header
self
represents. -
#quality : Float32
Returns the quality value of the header
self
represents.
Constructor Detail
Instance Method Detail
def header : String
#
Returns the full unaltered header self
represents.
E.x. text/html
, unicode-1-1;q=0.8
, or zh-Hans-CN
.
def normalized_header : String
#
Returns a normalized version of the #header
, excluding the #quality
parameter.
This includes removing extraneous whitespace, and alphabetizing the #parameters
.
def parameters : Hash(String, String)
#
Returns any extension parameters included in the header self
represents.
E.x. charset=UTF-8
or version=2
.