Skip to content

struct Athena::Negotiation::AcceptCharset
inherits Athena::Negotiation::BaseAccept #

Represents an Accept-Charset header character set.

accept = ANG::AcceptCharset.new "iso-8859-1; q = 0.5; key=value"

accept.header            # => "iso-8859-1; q = 0.5; key=value"
accept.normalized_header # => "iso-8859-1; key=value"
accept.parameters        # => {"key" => "value"}
accept.quality           # => 0.5
accept.charset           # => "iso-8859-1"

Methods#

#charset : String#

Returns the character set this AcceptCharset header represents.

I.e. #header minus the #quality and #parameters.

View source