Class: Excelerate::Workbook

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/excelerate/workbook.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Workbook

Returns a new instance of Workbook.



3
4
5
# File 'lib/excelerate/workbook.rb', line 3

def initialize(options = {})
  __setobj__ options[:workbook]
end

Instance Method Details

#firstObject



7
8
9
# File 'lib/excelerate/workbook.rb', line 7

def first
  Worksheet.new(:worksheet => __getobj__.worksheet(0))
end

#worksheet(index) ⇒ Object Also known as: []



11
12
13
# File 'lib/excelerate/workbook.rb', line 11

def worksheet(index)
  Worksheet.new(:worksheet => __getobj__.worksheet(index))
end