Class: Spreadsheet::TemplateHandler

Inherits:
ActionView::TemplateHandler
  • Object
show all
Includes:
ActionView::TemplateHandlers::Compilable
Defined in:
lib/spreadsheet/template_handler.rb

Instance Method Summary collapse

Instance Method Details

#compile(template) ⇒ Object



5
6
7
8
9
# File 'lib/spreadsheet/template_handler.rb', line 5

def compile(template)
  "sheet = ::Spreadsheet::Builder.new;" +
  "sheet.spreadsheet { "+template.source+" };" +
  "sheet.content;"
end