Class: Template::Handlers::AxlsxBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/axlsx_rails/template_handler.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(template) ⇒ Object



9
10
11
12
13
# File 'lib/axlsx_rails/template_handler.rb', line 9

def self.call(template)
  "xlsx_package = Axlsx::Package.new(:author => #{axlsx_author.inspect});\n" +
    template.source +
    ";\nxlsx_package.to_stream.string;"
end

Instance Method Details

#default_formatObject



5
6
7
# File 'lib/axlsx_rails/template_handler.rb', line 5

def default_format
  Mime::XLSX
end