Class: CanvasSync::Processors::AssignmentGroupsProcessor

Inherits:
ReportProcessor show all
Defined in:
lib/canvas_sync/processors/assignment_groups_processor.rb

Overview

Processes a assignment_groups report using the bulk importer.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ReportProcessor

#mapping

Constructor Details

#initialize(report_file_path, options) ⇒ AssignmentGroupsProcessor

Returns a new instance of AssignmentGroupsProcessor.



14
15
16
17
18
19
20
21
22
# File 'lib/canvas_sync/processors/assignment_groups_processor.rb', line 14

def initialize(report_file_path, options)
  CanvasSync::Importers::BulkImporter.import(
    report_file_path,
    mapping[:assignment_groups][:report_columns],
    AssignmentGroup,
    mapping[:assignment_groups][:conflict_target].to_sym,
    import_args: options
  )
end

Class Method Details

.process(report_file_path, _options, report_id) ⇒ Object



10
11
12
# File 'lib/canvas_sync/processors/assignment_groups_processor.rb', line 10

def self.process(report_file_path, _options, report_id)
  new(report_file_path, _options)
end