Class: ThinreportsHandler::TemplateHandler
- Inherits:
-
Object
- Object
- ThinreportsHandler::TemplateHandler
- Defined in:
- lib/thinreports-handler/template_handler.rb
Class Method Summary collapse
Class Method Details
.call(template) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/thinreports-handler/template_handler.rb', line 53 def self.call(template) %{ if defined?(report) #{template.source} else generate_options = nil ThinReports::Report.create do |__report__| report = ThinreportsHandler::ThinreportsTemplate.new(__report__, self, '#{template.virtual_path}') #{template.source} generate_options = report._generate_options end.generate(*([generate_options].compact)) end } end |