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