Sha256: 263bcbace9d7a973f38855cdbf6a9c5773e01bf614af464cd96a18fe0f0b20df

Contents?: true

Size: 442 Bytes

Versions: 7

Compression:

Stored size: 442 Bytes

Contents

# frozen_string_literal: true

module Importo
  if defined?(Servitium) && ApplicationContext < Servitium::Context
    class ImportContext < ApplicationContext
      input do
        attribute :import, type: Import, typecaster: ->(value) { value.is_a?(Import) ? value : Import.find(value) }
      end
    end
  else
    class ImportContext < ApplicationContext
      attribute :import, :model, class_name: "Importo::Import"
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
importo-3.0.21 app/services/importo/import_context.rb
importo-3.0.20 app/services/importo/import_context.rb
importo-3.0.19 app/services/importo/import_context.rb
importo-3.0.18 app/services/importo/import_context.rb
importo-3.0.17 app/services/importo/import_context.rb
importo-3.0.16 app/services/importo/import_context.rb
importo-3.0.15 app/services/importo/import_context.rb