Protocol::HTTPSourceProtocolHTTPHeaderAcceptEncodingEncoding

class Encoding

A parsed content encoding entry with an optional quality factor.

Definitions

def quality_factor

The quality factor for this encoding.

Signature

returns Float

the parsed quality factor, defaulting to 1.0.

Implementation

def quality_factor
	(q || 1.0).to_f
end

def <=>(other)

Compare encodings by descending quality factor.

Signature

parameter other Encoding

the other encoding to compare.

returns Integer

the comparison result.

Implementation

def <=> other
	other.quality_factor <=> self.quality_factor
end