Class: Decidim::Admin::Import::Verifier
- Inherits:
-
Object
- Object
- Decidim::Admin::Import::Verifier
- Includes:
- ActiveModel::Validations
- Defined in:
- 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
-
#initialize(headers:, data:, reader:, context: nil) ⇒ Verifier
constructor
Public: Initializes an Importer.
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 'lib/decidim/admin/import/verifier.rb', line 24 def initialize(headers:, data:, reader:, context: nil) @headers = headers @data = data @reader = reader @context = context end |