Class: RailsExcel::TemplateHandler
- Inherits:
-
Object
- Object
- RailsExcel::TemplateHandler
- Defined in:
- lib/rails-excel/template_handler.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(template, *args) ⇒ Object
6 7 8 |
# File 'lib/rails-excel/template_handler.rb', line 6 def self.call(template, *args) new.compile(template) end |
Instance Method Details
#compile(template) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/rails-excel/template_handler.rb', line 10 def compile(template) %Q{ io = StringIO.new RailsExcel.available_strategies[self.excel_strategy].compile(io) do |workbook| #{template.source} end self.output_buffer = io.string } end |