libraries/HighThroughputHelper.rb
# Generate part data objects to alter or edit 
Generate part data objects to alter or edit
Generate part data objects to alter or edit
def update_part_data_matrix(collection:, &block)
    collection_associations = AssociationMap.new(collection_from(collection))
    part_data_matrix = collection_associations.instance_variable_get(:@map).fetch('part_data', Array.new(collection.object_type.rows) { Array.new(collection.object_type.columns) { Hash.new() }})
    update_matrix(matrix: part_data_matrix) {|part_data| yield part_data }
    collection_associations.instance_variable_set(:@map, {'part_data'=>part_data_matrix})
    collection_associations.save()
  end
def update_part_data_matrix ( collection : , & block ) collection_associations = AssociationMap . new ( collection_from ( collection ) ) part_data_matrix = collection_associations . instance_variable_get ( :@map ) . fetch ( 'part_data' , Array . new ( collection . object_type . rows ) { Array . new ( collection . object_type . columns ) { Hash . new ( ) } } ) update_matrix ( matrix : part_data_matrix ) { | part_data | yield part_data } collection_associations . instance_variable_set ( :@map , { 'part_data' => part_data_matrix } ) collection_associations . save ( ) end
Generate part data objects to alter or edit
Generate part data objects to alter or edit
collection
block