Sha256: 91412b6c6b5dd90cc0eda2009ac675a082b17a1832d5b3b9a077fffe98bb98a4
Contents?: true
Size: 704 Bytes
Versions: 7
Compression:
Stored size: 704 Bytes
Contents
JS.Comparable = new JS.Module('Comparable', { extend: { ClassMethods: new JS.Module({ compare: function(one, another) { return one.compareTo(another); } }), included: function(base) { base.extend(this.ClassMethods); } }, lt: function(other) { return this.compareTo(other) < 0; }, lte: function(other) { return this.compareTo(other) < 1; }, gt: function(other) { return this.compareTo(other) > 0; }, gte: function(other) { return this.compareTo(other) > -1; }, eq: function(other) { return this.compareTo(other) === 0; }, between: function(a, b) { return this.gte(a) && this.lte(b); } });
Version data entries
7 entries across 7 versions & 2 rubygems