Sha256: d0369afd5960bc1e04772795e3c760cfea74e961a94e83f4bb54dde5702fb83d

Contents?: true

Size: 676 Bytes

Versions: 4

Compression:

Stored size: 676 Bytes

Contents

module RooModule
  
  def sheets
    @engine.sheets
  end

  def selected_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

4 entries across 4 versions & 1 rubygems

Version Path
simple-spreadsheet-0.1.0 lib/simple-spreadsheet/modules/roo_module.rb
simple-spreadsheet-0.0.6 lib/simple-spreadsheet/modules/roo_module.rb
simple-spreadsheet-0.0.5.4 lib/simple-spreadsheet/modules/roo_module.rb
simple-spreadsheet-0.0.5.3 lib/simple-spreadsheet/modules/roo_module.rb