Sha256: c07786b1018482a5852bf21db7168d05ba67d83a02489a82bc99fa51c3c633e0

Contents?: true

Size: 557 Bytes

Versions: 18

Compression:

Stored size: 557 Bytes

Contents

module CmAdmin
  module Models
    class Importer

      attr_accessor :class_name, :importer_type

      VALID_IMPORTER_TYPES = [:csv_importer, :custom_importer]

      def initialize(class_name, importer_type=:csv_importer)
        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
      end

    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
cm-admin-1.0.7 lib/cm_admin/models/importer.rb
cm-admin-1.0.6 lib/cm_admin/models/importer.rb
cm-admin-1.0.5 lib/cm_admin/models/importer.rb
cm-admin-1.0.3 lib/cm_admin/models/importer.rb
cm-admin-1.0.2 lib/cm_admin/models/importer.rb
cm-admin-1.0.0 lib/cm_admin/models/importer.rb
cm-admin-0.9.1 lib/cm_admin/models/importer.rb
cm-admin-0.9.0 lib/cm_admin/models/importer.rb
cm-admin-0.8.9 lib/cm_admin/models/importer.rb
cm-admin-0.8.8 lib/cm_admin/models/importer.rb
cm-admin-0.8.7 lib/cm_admin/models/importer.rb
cm-admin-0.8.6 lib/cm_admin/models/importer.rb
cm-admin-0.8.5 lib/cm_admin/models/importer.rb
cm-admin-0.8.4 lib/cm_admin/models/importer.rb
cm-admin-0.8.3 lib/cm_admin/models/importer.rb
cm-admin-0.8.2 lib/cm_admin/models/importer.rb
cm-admin-0.8.1 lib/cm_admin/models/importer.rb
cm-admin-0.8.0 lib/cm_admin/models/importer.rb