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-1.5.47 lib/cm_admin/models/importer.rb
cm-admin-1.5.46 lib/cm_admin/models/importer.rb
cm-admin-1.5.45 lib/cm_admin/models/importer.rb
cm-admin-1.5.44 lib/cm_admin/models/importer.rb
cm-admin-1.5.43 lib/cm_admin/models/importer.rb
cm-admin-1.5.42 lib/cm_admin/models/importer.rb
cm-admin-1.5.41 lib/cm_admin/models/importer.rb
cm-admin-1.5.40 lib/cm_admin/models/importer.rb
cm-admin-1.5.39 lib/cm_admin/models/importer.rb
cm-admin-1.5.38 lib/cm_admin/models/importer.rb
cm-admin-1.5.37 lib/cm_admin/models/importer.rb
cm-admin-1.5.36 lib/cm_admin/models/importer.rb
cm-admin-1.5.35 lib/cm_admin/models/importer.rb
cm-admin-1.5.34 lib/cm_admin/models/importer.rb
cm-admin-1.5.33 lib/cm_admin/models/importer.rb
cm-admin-1.5.32 lib/cm_admin/models/importer.rb
cm-admin-1.5.31 lib/cm_admin/models/importer.rb
cm-admin-1.5.30 lib/cm_admin/models/importer.rb
cm-admin-1.5.29 lib/cm_admin/models/importer.rb
cm-admin-1.5.28 lib/cm_admin/models/importer.rb