Class: Tube::StockMx

Inherits:
Purpose show all
Defined in:
app/models/tube/stock_mx.rb

Instance Method Summary collapse

Methods inherited from Purpose

#create!, #library_source_plates, #sibling_tubes, standard_library_tube, standard_mx_tube, standard_sample_tube, stock_library_tube, stock_mx_tube, #stock_plate

Methods inherited from Purpose

#barcode_type, #prefix=, #set_default_barcode_prefix, #source_plate, #target_class

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods included from Purpose::Relationship::Associations

included

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

#transition_to(tube, state, _user, _ = nil, _customer_accepts_responsibility = false) ⇒ Object


2
3
4
5
6
7
8
9
# File 'app/models/tube/stock_mx.rb', line 2

def transition_to(tube, state, _user, _ = nil, _customer_accepts_responsibility = false)
  tube.transfer_requests_as_target.each do |request|
    request.transition_to(state)
  end
  tube.requests_as_target.opened.each do |request|
    request.transition_to(state)
  end
end