Class: StateChanger::StandardPlate

Inherits:
Base
  • Object
show all
Defined in:
app/models/state_changer/standard_plate.rb

Overview

Handles the basic transitions of a standard plate

Direct Known Subclasses

InputPlate

Instance Attribute Summary

Attributes inherited from Base

#labware, #user

Instance Method Summary collapse

Methods inherited from Base

#associated_request_target_state, #contents, #customer_accepts_responsibility, #map_target_state_to_associated_request_state, #target_state

Instance Method Details

#update_labware_stateVoid

Updates the state of the labware to the target state. The basic implementation does this by updating all of the TransferRequest instances to the state specified. If Base#contents is blank then the change is assumed to relate to all wells of the plate, otherwise only the selected ones are updated.

Returns:

  • (Void)

14
15
16
17
18
# File 'app/models/state_changer/standard_plate.rb', line 14

def update_labware_state
  broadcast_library_start unless %w[failed cancelled].include?(target_state)
  update_transfer_requests
  update_associated_requests if associated_request_target_state
end