Class: SangerSampleId

Inherits:
ApplicationRecord show all
Defined in:
app/models/sanger_sample_id.rb

Defined Under Namespace

Classes: Factory

Class Method Summary collapse

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Class Method Details

.generate_sanger_sample_id!(study_abbreviation, sanger_id = nil) ⇒ Object


15
16
17
# File 'app/models/sanger_sample_id.rb', line 15

def generate_sanger_sample_id!(study_abbreviation, sanger_id = nil)
  "#{study_abbreviation}#{sanger_id || SangerSampleId::Factory.instance.next!}"
end