Class: Template::Handlers::OsheetHandler

Inherits:
Template::Handler
  • Object
show all
Includes:
Compilable
Defined in:
lib/osheet/view_handler/rails.rb

Instance Method Summary collapse

Instance Method Details

#compile(template) ⇒ Object



34
35
36
37
# File 'lib/osheet/view_handler/rails.rb', line 34

def compile(template)
  # template.format => 'xls' (or xlsx or whatever they specify)
  %{::Osheet::Workbook.new {\n#{template.source}\n }.to_data}
end