class LessEqualAssay

Compare assertion is used to test a comparision made by ‘#<=`.

NOTE: We are taking some leeway here with the name of this class, which ordinarily would be called ‘LesserThanOrEqualAssay`. However, such a name is a bit winded. The shortest name then, without resorting to abbreviations, is less-equal, a monosyllabic reading of the operator itself. Since it is ordinarily meaningless to say something is “more equal” than something else, why not allow it to be meaningful and save ourselves all that uneccessary verbage?

Public Class Methods

pass?(subject, criterion) click to toggle source

Check assertion.

# File lib/assay/less_equal_assay.rb, line 20
def self.pass?(subject, criterion)
  subject <= criterion
end