Sha256: 0b498e3ae7356b9603d1865b60fc6d7c776e1aef1d21470ea61838024b45ed22

Contents?: true

Size: 780 Bytes

Versions: 3

Compression:

Stored size: 780 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 first_column
    @engine.first_column
  end
  
  def last_column
    @engine.last_column
  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

3 entries across 3 versions & 1 rubygems

Version Path
simple-spreadsheet-0.3.1 lib/simple-spreadsheet/modules/roo_module.rb
simple-spreadsheet-0.2.0 lib/simple-spreadsheet/modules/roo_module.rb
simple-spreadsheet-0.1.1 lib/simple-spreadsheet/modules/roo_module.rb