Class: GalterIrExporter::Migration::Survey::Surveyor

Inherits:
Object
  • Object
show all
Defined in:
lib/galter_ir_exporter/migration/survey/surveyor.rb

Class Method Summary collapse

Class Method Details

.call(id_list) ⇒ Object

call causes the surveyor to create a survey item for each id in the list

Parameters:

  • id_list (Array)

    a list of ids to be surveyed



10
11
12
13
14
15
16
# File 'lib/galter_ir_exporter/migration/survey/surveyor.rb', line 10

def call(id_list)
  ActiveFedora::Base.find(id_list).each do |object|
    Item.find_or_create_by(object_id: object.id) do |item|
      item.assign_attributes(object_class: object.class, object_title: object.title, migration_status: :initial_state)
    end
  end
end