Sha256: 2fdac8ece8bf904ace6d18238bf7f6535fdd1326198903b0118db0c3d0289324

Contents?: true

Size: 643 Bytes

Versions: 137

Compression:

Stored size: 643 Bytes

Contents

module CmAdmin
  module Models
    class Importer

      attr_accessor :class_name, :importer_type, :sample_file_path

      VALID_IMPORTER_TYPES = [:csv_importer, :custom_importer]

      def initialize(class_name, importer_type=:csv_importer, sample_file_path=nil)
        raise ArgumentError, "Kindly select a valid importer type like #{VALID_IMPORTER_TYPES.sort.to_sentence(last_word_connector: ', or ')} instead of #{importer_type}" unless VALID_IMPORTER_TYPES.include?(importer_type.to_sym)
        @class_name = class_name
        @importer_type = importer_type
        @sample_file_path = sample_file_path
      end

    end
  end
end

Version data entries

137 entries across 137 versions & 1 rubygems

Version Path
cm-admin-4.4.8 lib/cm_admin/models/importer.rb
cm-admin-4.4.6 lib/cm_admin/models/importer.rb
cm-admin-4.4.1 lib/cm_admin/models/importer.rb
cm-admin-4.4.0 lib/cm_admin/models/importer.rb
cm-admin-4.3.0 lib/cm_admin/models/importer.rb
cm-admin-4.2.1 lib/cm_admin/models/importer.rb
cm-admin-4.2.0 lib/cm_admin/models/importer.rb
cm-admin-4.1.2 lib/cm_admin/models/importer.rb
cm-admin-4.1.1 lib/cm_admin/models/importer.rb
cm-admin-4.1.0 lib/cm_admin/models/importer.rb
cm-admin-4.0.0 lib/cm_admin/models/importer.rb
cm-admin-3.0.16 lib/cm_admin/models/importer.rb
cm-admin-3.0.15 lib/cm_admin/models/importer.rb
cm-admin-3.0.14 lib/cm_admin/models/importer.rb
cm-admin-3.0.13 lib/cm_admin/models/importer.rb
cm-admin-3.0.12 lib/cm_admin/models/importer.rb
cm-admin-3.0.11 lib/cm_admin/models/importer.rb
cm-admin-3.0.10 lib/cm_admin/models/importer.rb
cm-admin-3.0.9 lib/cm_admin/models/importer.rb
cm-admin-3.0.8 lib/cm_admin/models/importer.rb