Class: Thinreports::SectionReport::Builder::ReportBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/thinreports/section_report/builder/report_builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(schema) ⇒ ReportBuilder

Returns a new instance of ReportBuilder.



10
11
12
# File 'lib/thinreports/section_report/builder/report_builder.rb', line 10

def initialize(schema)
  @schema = schema
end

Instance Method Details

#build(params) ⇒ Object



14
15
16
17
18
19
# File 'lib/thinreports/section_report/builder/report_builder.rb', line 14

def build(params)
  ReportData::Main.new(
    schema,
    build_groups(params[:groups])
  )
end