Class: CanvasSync::Processors::NormalProcessor
- Inherits:
-
ReportProcessor
- Object
- ReportProcessor
- CanvasSync::Processors::NormalProcessor
- Defined in:
- lib/canvas_sync/processors/normal_processor.rb
Overview
Processes any report using the normal bulk importer.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(report_file_path, options) ⇒ NormalProcessor
constructor
A new instance of NormalProcessor.
Methods inherited from ReportProcessor
#do_bulk_import, #mapping, #mapping_for
Constructor Details
#initialize(report_file_path, options) ⇒ NormalProcessor
Returns a new instance of NormalProcessor.
15 16 17 18 19 20 21 22 23 |
# File 'lib/canvas_sync/processors/normal_processor.rb', line 15 def initialize(report_file_path, ) m = mapping[[:mapping].to_sym] CanvasSync::Importers::BulkImporter.import( report_file_path, m[:columns], [:klass].constantize, m[:conflict_target], ) end |
Class Method Details
.process(report_file_path, options, report_id) ⇒ Object
11 12 13 |
# File 'lib/canvas_sync/processors/normal_processor.rb', line 11 def self.process(report_file_path, , report_id) new(report_file_path, ) end |