Sha256: 999982ed358e8144b8b1d656589c1bf7a9d2d73ee244b06656a67665d99952a3

Contents?: true

Size: 675 Bytes

Versions: 2

Compression:

Stored size: 675 Bytes

Contents

module RooModule
  
  def sheets
    @engine.sheets
  end

  def default_sheet=(sheet)
    if sheet.is_a? Integer
      @engine.default_sheet = @engine.sheets[sheet - 1]
    else
      @engine.default_sheet = sheet
    end
  end
  
  def first_row
    1
  end
  
  def last_row
    @engine.last_row
  end
  
  def cell(row, col, sheet=nil)
    if sheet.is_a? Integer
      @engine.cell(row, col, @engine.sheets[sheet - 1])
    else
      @engine.cell(row, col, sheet)
    end
  end

  def celltype(row, col, sheet=nil)
    if sheet.is_a? Integer
      @engine.celltype(row, col, @engine.sheets[sheet - 1])
    else
      @engine.celltype(row, col, sheet)
    end
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple-spreadsheet-0.0.5.2 lib/simple-spreadsheet/modules/roo_module.rb
simple-spreadsheet-0.0.5.1 lib/simple_spreadsheet/modules/roo_module.rb