Class: SequencescapeExcel::SpecialisedField::LibraryType

Inherits:
Object
  • Object
show all
Includes:
Base, ValueRequired
Defined in:
app/sequencescape_excel/sequencescape_excel/specialised_field/library_type.rb

Overview

The library type is a value which must already exist. Weirdly the library type is stored as a value rather than an association.

Instance Attribute Summary

Attributes included from Base

#sample_manifest_asset, #value

Instance Method Summary collapse

Methods included from Base

#link

Instance Method Details

#update(attributes = {}) ⇒ Object


14
15
16
17
18
19
20
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/library_type.rb', line 14

def update(attributes = {})
  return unless valid? && attributes[:aliquot].present?

  aliquots.each do |aliquot|
    aliquot.library_type = value
  end
end