Method: Enumerable#increasing?
- Defined in:
- lib/mongo_oplog_backup/ext/enumerable.rb
#increasing? ⇒ Boolean
Strictly increasing, in other words sorted and unique
12 13 14 15 16 |
# File 'lib/mongo_oplog_backup/ext/enumerable.rb', line 12 def increasing? each_cons(2).all? do |a, b| (a <=> b) < 0 end end |