class Thinreports::SectionReport::Generate

Attributes

pdf[R]

Public Class Methods

new() click to toggle source
# File lib/thinreports/section_report/generate.rb, line 9
def initialize
  @pdf = Thinreports::Generator::PDF::Document.new
end

Public Instance Methods

call(report_params, filename: nil) click to toggle source
# File lib/thinreports/section_report/generate.rb, line 13
def call(report_params, filename: nil)
  report = Build.new.call(report_params)

  PDF::Render.new(pdf).call!(report)

  filename ? pdf.render_file(filename) : pdf.render
end