class Decidim::Importers::ImportManifest

For importing data from files to components. Every resource type should specify it's own creator, which will be responsible for producing (creating) and finishing (saving) the imported resource.

Constants

DEFAULT_FORMATS

Attributes

manifest[R]
name[R]

Public Class Methods

new(name, manifest) click to toggle source

Initializes the manifest.

name - The name of the export artifact. It should be unique in the

space or component.

manifest - The parent manifest where this import manifest belongs to.

# File lib/decidim/importers/import_manifest.rb, line 18
def initialize(name, manifest)
  @name = name.to_sym
  @manifest = manifest
end

Public Instance Methods

creator(creator = nil) click to toggle source

Public: Sets the creator when an argument is provided, returns the stored creator otherwise.

# File lib/decidim/importers/import_manifest.rb, line 25
def creator(creator = nil)
  @creator ||= creator || Decidim::Admin::Import::Creator
end
formats() click to toggle source
# File lib/decidim/importers/import_manifest.rb, line 31
def formats
  DEFAULT_FORMATS
end