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-2.2.1 lib/cm_admin/models/importer.rb
cm-admin-2.2.0 lib/cm_admin/models/importer.rb
cm-admin-2.1.5 lib/cm_admin/models/importer.rb
cm-admin-2.1.4 lib/cm_admin/models/importer.rb
cm-admin-2.1.3 lib/cm_admin/models/importer.rb
cm-admin-2.1.2 lib/cm_admin/models/importer.rb
cm-admin-2.1.1 lib/cm_admin/models/importer.rb
cm-admin-2.1.0 lib/cm_admin/models/importer.rb
cm-admin-2.0.2 lib/cm_admin/models/importer.rb
cm-admin-2.0.1 lib/cm_admin/models/importer.rb
cm-admin-2.0.0 lib/cm_admin/models/importer.rb
cm-admin-1.5.56 lib/cm_admin/models/importer.rb
cm-admin-1.5.55 lib/cm_admin/models/importer.rb
cm-admin-1.5.54 lib/cm_admin/models/importer.rb
cm-admin-1.5.53 lib/cm_admin/models/importer.rb
cm-admin-1.5.52 lib/cm_admin/models/importer.rb
cm-admin-1.5.51 lib/cm_admin/models/importer.rb
cm-admin-1.5.50 lib/cm_admin/models/importer.rb
cm-admin-1.5.49 lib/cm_admin/models/importer.rb
cm-admin-1.5.48 lib/cm_admin/models/importer.rb