Class: StateChanger::TubeBase Abstract

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

Overview

This class is abstract.

This class should not be used directly. Subclasses should at least implement #update_associated_requests

Shared behaviour for tubes

Direct Known Subclasses

InitialStockTube, MxTube, StockTube

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.

Returns:

  • (Void)

10
11
12
13
# File 'app/models/state_changer/tube_base.rb', line 10

def update_labware_state
  update_associated_requests if associated_request_target_state
  update_transfer_requests
end