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.29.1 app/serializers/decidim/importers/importer.rb
decidim-core-0.28.4 app/serializers/decidim/importers/importer.rb
decidim-core-0.27.9 app/serializers/decidim/importers/importer.rb
decidim-core-0.29.0 app/serializers/decidim/importers/importer.rb
decidim-core-0.28.3 app/serializers/decidim/importers/importer.rb
decidim-core-0.27.8 app/serializers/decidim/importers/importer.rb
decidim-core-0.29.0.rc4 app/serializers/decidim/importers/importer.rb
decidim-core-0.29.0.rc3 app/serializers/decidim/importers/importer.rb
decidim-core-0.29.0.rc2 app/serializers/decidim/importers/importer.rb
decidim-core-0.29.0.rc1 app/serializers/decidim/importers/importer.rb
decidim-core-0.28.2 app/serializers/decidim/importers/importer.rb
decidim-core-0.27.7 app/serializers/decidim/importers/importer.rb
decidim-core-0.28.1 app/serializers/decidim/importers/importer.rb
decidim-core-0.27.6 app/serializers/decidim/importers/importer.rb
decidim-core-0.26.10 app/serializers/decidim/importers/importer.rb
decidim-core-0.26.9 app/serializers/decidim/importers/importer.rb
decidim-core-0.28.0 app/serializers/decidim/importers/importer.rb
decidim-core-0.27.5 app/serializers/decidim/importers/importer.rb
decidim-core-0.28.0.rc5 app/serializers/decidim/importers/importer.rb
decidim-core-0.28.0.rc4 app/serializers/decidim/importers/importer.rb