Module: PlatePurpose::Library

Overview

Assigns library information to the aliquots when the Plate is passed. This behaviour is now mostly handled by the library creation requests themselves

Constant Summary collapse

STATES_TO_ASSIGN_LIBRARY_INFORMATION =
%w[started passed]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


6
7
8
9
10
# File 'app/models/plate_purpose/library.rb', line 6

def self.included(base)
  base.class_eval do
    include PlatePurpose::WorksOnLibraryRequests
  end
end

Instance Method Details

#transition_to(plate, state, user, contents = nil, customer_accepts_responsibility = false) ⇒ Object


14
15
16
17
# File 'app/models/plate_purpose/library.rb', line 14

def transition_to(plate, state, user, contents = nil, customer_accepts_responsibility = false)
  super
  assign_library_information_to_wells(plate) if STATES_TO_ASSIGN_LIBRARY_INFORMATION.include?(state)
end