Method: ExcelTemplating::Document#initialize

Defined in:
lib/excel_templating/document.rb

#initialize(data) ⇒ Document

Create a new document with given data. 'all_sheets' is available to the template on each sheet. otherwise each numeric key in 'sheet_data' provides the data for that specific sheet. For example {foo: 'bar', 1 => "foo"}

Parameters:

  • data (Hash)

    Hash with variables for rendering.



45
46
47
# File 'lib/excel_templating/document.rb', line 45

def initialize(data)
  @data = data
end