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