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