Class: SequencescapeExcel::SpecialisedField::RetentionInstruction
Overview
Sets Retention Instruction on the labware custom metadata
Instance Attribute Summary
Attributes included from Base
#sample_manifest_asset, #value
Instance Method Summary
collapse
#find_retention_instruction_from_key, #find_retention_instruction_key_for_value, #find_retention_instruction_to_display, #retention_instruction_option_for_select
Methods included from Base
#link
Instance Method Details
#asset_labware ⇒ Object
20
21
22
|
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/retention_instruction.rb', line 20
def asset_labware
@asset_labware ||= asset.labware
end
|
28
29
30
|
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/retention_instruction.rb', line 28
def labware_metadata
@labware_metadata ||= labware_metadatum_collection.metadata.symbolize_keys
end
|
24
25
26
|
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/retention_instruction.rb', line 24
def labware_metadatum_collection
@labware_metadatum_collection ||= asset_labware.custom_metadatum_collection
end
|
#update(_attributes = {}) ⇒ Object
12
13
14
15
16
17
18
|
# File 'app/sequencescape_excel/sequencescape_excel/specialised_field/retention_instruction.rb', line 12
def update(_attributes = {})
return unless valid?
return if asset_labware.blank?
update_retention_instructions
end
|