Sha256: 8cdd616a4111941336bf8a11da5faa3d5f8040b1c7cbd6231df56a9058f30f43
Contents?: true
Size: 467 Bytes
Versions: 6
Compression:
Stored size: 467 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin module Import # A factory class providing easier way to create new importers. class ImporterFactory def self.build(file, mime_type, **) reader = Readers.search_by_mime_type(mime_type) raise NotImplementedError, "No reader implemented for mime type: #{mime_type}" if reader.nil? Importer.new(file:, reader:, **) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems