View definition

def Axlsx::Package#workbook

Defined in github.com/randym/axlsx/lib/axlsx/package.rb

Description

Note:

As there are multiple ways to instantiate a workbook for the package, here are a few examples:

# assign directly during package instanciation
wb = Package.new(:workbook => Workbook.new).workbook

# get a fresh workbook automatically from the package
wb = Pacakge.new().workbook
#     # set the workbook after creating the package
wb = Package.new().workbook = Workbook.new

The workbook this package will serialize or validate.

Yields:

  • (@workbook)

Raises:

  • ArgumentError if workbook parameter is not a Workbook instance.

workbook is referenced in 0 repositories