Class: Col::Utils
- Inherits:
-
Object
- Object
- Col::Utils
- Defined in:
- lib/col.rb
Overview
Utility methods to enable Col to work on 1.8.6.
Class Method Summary collapse
Class Method Details
.each_pair(array, &block) ⇒ Object
355 356 357 358 359 360 361 362 |
# File 'lib/col.rb', line 355 def self.each_pair(array) a = array.dup loop do pair = a.slice!(0,2) break if pair.empty? yield pair end end |