Class: RailsExcel::Strategies::Spreadsheet

Inherits:
Object
  • Object
show all
Defined in:
lib/rails-excel/strategies/spreadsheet.rb,
lib/rails-excel/strategies/spreadsheet/version.rb

Constant Summary collapse

VERSION =
'0.0.1'

Instance Method Summary collapse

Instance Method Details

#compile(io) {|workbook| ... } ⇒ Object

Yields:

  • (workbook)


7
8
9
10
11
# File 'lib/rails-excel/strategies/spreadsheet.rb', line 7

def compile(io, &block)
  workbook = ::Spreadsheet::Workbook.new
  yield(workbook)
  workbook.write(io)
end