Sha256: 335ffd515582ad9d9e693ae241dc0638afc29ff52fbda915c07b5e5a900b7d74

Contents?: true

Size: 423 Bytes

Versions: 12

Compression:

Stored size: 423 Bytes

Contents

# patch for skipping blank rows in the case of
# having a spreadsheet with 30,000 nil rows appended
# to the actual data.  (it happens and your RAM will love me)
class Spreadsheet::Worksheet

  def each skip=dimensions[0]
    blanks = 0
    skip.upto(dimensions[1] - 1) do |i|
      if row(i).any?
        Proc.new.call(row(i))
      else
        blanks += 1
        blanks < 20 ? next : return
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/roo-1.13.2/lib/roo/worksheet.rb
roo-1.13.2 lib/roo/worksheet.rb
roo-1.13.1 lib/roo/worksheet.rb
roo-1.13.0 lib/roo/worksheet.rb
roo-1.12.2 lib/roo/worksheet.rb
roo-1.12.1 lib/roo/worksheet.rb
roo-1.12.0 lib/roo/worksheet.rb
roo-1.11.2 lib/roo/worksheet.rb
roo-1.11.1 lib/roo/worksheet.rb
roo-1.11.0 lib/roo/worksheet.rb
roo-1.10.3 lib/roo/worksheet.rb
roo-1.10.2 lib/roo/worksheet.rb