Sha256: 8145455a3b72ccef9adcbe84c94722143a202c90452345d6e025ea7b29ce179a

Contents?: true

Size: 702 Bytes

Versions: 56

Compression:

Stored size: 702 Bytes

Contents

require_relative "./report_processor"

module CanvasSync
  module Processors
    # Processes any report using the normal bulk importer.
    #
    # @param report_file_path [String]
    # @param options [Hash]
    # @param report_id [Integer]
    class NormalProcessor < ReportProcessor
      def self.process(report_file_path, options, report_id)
        new(report_file_path, options)
      end

      def initialize(report_file_path, options)
        m = mapping[options[:mapping].to_sym]
        CanvasSync::Importers::BulkImporter.import(
          report_file_path,
          m[:columns],
          options[:klass].constantize,
          m[:conflict_target],
        )
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
canvas_sync-0.19.0.beta1 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.12 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.10 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.9 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.8 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.7 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.6 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.5 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.3 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.2 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.1 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.0.beta2 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.18.0.beta1 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.17.43 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.17.42 lib/canvas_sync/processors/normal_processor.rb
canvas_sync-0.17.41 lib/canvas_sync/processors/normal_processor.rb