Module: Spreadsheet::Helpers

Defined in:
lib/spreadsheet/helpers.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) rcompact(array)



3
4
5
6
7
8
# File 'lib/spreadsheet/helpers.rb', line 3

def rcompact(array)
  while !array.empty? && array.last.nil?
    array.pop
  end
  array
end