Sha256: d63c03a72257b91fc64eddf347561c262e81152cca6191a789df82d45faf7aa2
Contents?: true
Size: 491 Bytes
Versions: 7
Compression:
Stored size: 491 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, **keyword_args) 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:, **keyword_args) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems