View definition

def Axlsx::Package#zip_entry_for_part

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

Description

Generate a Entry for the given package part. The important part here is to explicitly set the timestamp for the zip entry: Serializing axlsx packages with identical contents should result in identical zip files – however, the timestamp of a zip entry defaults to the time of serialization and therefore the zip file contents would be different every time the package is serialized.

Note: Core#created also defaults to the current time – so to generate identical axlsx packages you have to set this explicitly, too (eg. with `Package.new(created_at: Time.local(2013, 1, 1))`).

Parameters:

  • part

    A hash describing a part of this pacakge (see #parts)

zip_entry_for_part is referenced in 0 repositories