Class: SequencescapeExcel::SpecialisedField::Tag2Index

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

Overview

TagIndex

Instance Attribute Summary collapse

Attributes included from Base

#sample_manifest_asset, #value

Instance Method Summary collapse

Methods included from ValueToInteger

#value=

Instance Attribute Details

#sf_tag2_groupObject

Returns the value of attribute sf_tag2_group.



11
12
13
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/tag2_index.rb', line 11

def sf_tag2_group
  @sf_tag2_group
end

Instance Method Details



21
22
23
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/tag2_index.rb', line 21

def link(other_fields)
  self.sf_tag2_group = other_fields[SequencescapeExcel::SpecialisedField::Tag2Group]
end

#update(_attributes = {}) ⇒ Object



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

def update(_attributes = {})
  return unless valid?

  aliquots.each { |aliquot| aliquot.tag2 = tag } if tag.present? && tag.oligo.present?
end