class Charset
A parsed character set entry with an optional quality factor.
Definitions
def quality_factor
The quality factor for this character set.
Signature
-
returns
Float the parsed quality factor, defaulting to
1.0.
Implementation
def quality_factor
(q || 1.0).to_f
end
def <=>(other)
Compare character sets by descending quality factor.
Signature
-
parameter
otherCharset the other character set to compare.
-
returns
Integer the comparison result.
Implementation
def <=> other
other.quality_factor <=> self.quality_factor
end