struct Athena::Negotiation::AcceptCharset

Overview

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"

Defined in:

accept_charset.cr

Instance Method Summary

Instance methods inherited from struct Athena::Negotiation::BaseAccept

header : String header, normalized_header : String normalized_header, parameters : Hash(String, String) parameters, quality : Float32 quality

Constructor methods inherited from struct Athena::Negotiation::BaseAccept

new(header : String) new

Instance Method Detail

def charset : String #

Returns the character set this AcceptCharset header represents.

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


[View source]