Class: Decidim::Admin::Import::Verifier

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
decidim-admin/lib/decidim/admin/import/verifier.rb

Overview

This is the default verifier class that verifies the import data is valid before starting the import process. It makes sure the data is in correct format, contains the correct data headers, etc.

Individual importers can extend this class to customize the verification process.

Instance Method Summary collapse

Constructor Details

#initialize(headers:, data:, reader:, context: nil) ⇒ Verifier

Public: Initializes an Importer.

headers - An array of the data headers for the import. data - An array of the generated data records to be imported. reader - A Reader class that was used to read the raw data. context - A hash including component specific data.



24
25
26
27
28
29
# File 'decidim-admin/lib/decidim/admin/import/verifier.rb', line 24

def initialize(headers:, data:, reader:, context: nil)
  @headers = headers
  @data = data
  @reader = reader
  @context = context
end