Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/spreadsheet/helpers.rb

Direct Known Subclasses

Spreadsheet::Row

Instance Method Summary collapse

Instance Method Details

#rcompactObject



2
3
4
# File 'lib/spreadsheet/helpers.rb', line 2

def rcompact
  dup.rcompact!
end

#rcompact!Object



5
6
7
8
9
10
# File 'lib/spreadsheet/helpers.rb', line 5

def rcompact!
  while !empty? && last.nil?
    pop
  end
  self
end