Sha256: afb9b0f00068f9c701ca8be35db0e6f281282657e545203408c52ebb4878cda2

Contents?: true

Size: 896 Bytes

Versions: 62

Compression:

Stored size: 896 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Importers
    # This class is an abstraction that defines a common and flexible interface
    # in how importers should be called.
    class Importer
      # Imports the contents of the `serialized` argument.
      #
      # Importers that import JSON will normally accept a JSON valid value for
      # the `serialized` argument.
      # This values may be either: object, array, string, number, true, false
      # or null.
      #
      # Returns: What has been imported.
      #
      # +serialized+: The serialized version of the resource to import.
      # +user+: The Decidim::User that is importing.
      # +opts+: Extra options that specific subclasses may require.
      def import(_serialized, _user, _opts = {})
        raise NotImplementedError, "Decidim::Importers::Importer should be subclassed."
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
decidim-core-0.25.0.rc4 app/serializers/decidim/importers/importer.rb
decidim-core-0.25.0.rc3 app/serializers/decidim/importers/importer.rb
decidim-core-0.25.0.rc2 app/serializers/decidim/importers/importer.rb
decidim-core-0.25.0.rc1 app/serializers/decidim/importers/importer.rb
decidim-core-0.24.3 app/serializers/decidim/importers/importer.rb
decidim-core-0.23.6 app/serializers/decidim/importers/importer.rb
decidim-core-0.24.2 app/serializers/decidim/importers/importer.rb
decidim-core-0.23.5 app/serializers/decidim/importers/importer.rb
decidim-core-0.24.1 app/serializers/decidim/importers/importer.rb
decidim-core-0.24.0 app/serializers/decidim/importers/importer.rb
decidim-core-0.24.0.rc2 app/serializers/decidim/importers/importer.rb
decidim-core-0.23.4 app/serializers/decidim/importers/importer.rb
decidim-core-0.24.0.rc1 app/serializers/decidim/importers/importer.rb
decidim-core-0.23.3 app/serializers/decidim/importers/importer.rb
decidim-core-0.23.2 app/serializers/decidim/importers/importer.rb
decidim-core-0.23.1 app/serializers/decidim/importers/importer.rb
decidim-core-0.23.1.rc1 app/serializers/decidim/importers/importer.rb
decidim-core-0.23.0 app/serializers/decidim/importers/importer.rb
decidim-core-0.22.0 app/serializers/decidim/importers/importer.rb
decidim-core-0.21.0 app/serializers/decidim/importers/importer.rb