Class: Labware

Inherits:
Asset show all
Defined in:
app/models/labware.rb

Overview

Labware represents a physical object which moves around the lab. It has one or more receptacles. This class has been created as part of the AssetRefactor when not in refactor mode this class is pretty much ignored

Direct Known Subclasses

Fragment, Lane::Labware, Plate

Defined Under Namespace

Classes: CommentsController

Instance Method Summary collapse

Methods inherited from Asset

#add_parent, #ancestor_of_purpose, #asset_type_for_request_types, #assign_relationships, #barcode_number, #compatible_purposes, #contained_samples, #details, #external_identifier, #generate_barcode, #get_qc_result_value_for, #has_stock_asset?, #label, #label=, #original_stock_plates, #prefix, #printable?, #printable_target, #register_stock!, #request_types, #role, #source_plate, #spiked_in_buffer, #summary_hash, #type, #update_from_qc

Methods included from EventfulRecord

#has_many_events, #has_many_lab_events, #has_one_event_with_family

Methods included from Event::PlateEvents

#event_date, #fluidigm_stamp_date, #gel_qc_date, #pico_date, #qc_started_date, #sequenom_stamp_date

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

Instance Method Details

#display_nameObject


26
27
28
# File 'app/models/labware.rb', line 26

def display_name
  name.presence || "#{sti_type} #{id}"
end

#generate_name(new_name) ⇒ Object

Note:

Overridden on subclasses to append the asset id to the name via on_create callbacks

Assigns name


22
23
24
# File 'app/models/labware.rb', line 22

def generate_name(new_name)
  self.name = new_name
end

#human_barcodeObject


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

def human_barcode
  'UNKNOWN'
end