Sha256: 23f3cf127f8e4321af27fd53c16a472f1362ae9b764b926a758741af2fad07f1
Contents?: true
Size: 745 Bytes
Versions: 2
Compression:
Stored size: 745 Bytes
Contents
require_relative 'compare_assay' # 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? # class LessEqualAssay < CompareAssay register :<=, :less_equal # # Check assertion. # def self.pass?(subject, criterion) subject <= criterion end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
assay-0.4.1 | lib/assay/less_equal_assay.rb |
assay-0.4.0 | lib/assay/less_equal_assay.rb |