Class: Api::RequestIo::WarehouseAsset

Inherits:
Object
  • Object
show all
Defined in:
app/models/api/request_io.rb

Overview

Maintains the pre-existing identifiers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(asset) ⇒ WarehouseAsset

Returns a new instance of WarehouseAsset.



45
46
47
# File 'app/models/api/request_io.rb', line 45

def initialize(asset)
  @asset = asset.is_a?(Well) ? asset : asset.try(:labware)
end

Instance Attribute Details

#assetObject (readonly)

Returns the value of attribute asset.



43
44
45
# File 'app/models/api/request_io.rb', line 43

def asset
  @asset
end

Instance Method Details

#two_dimensional_barcodeObject



49
50
51
# File 'app/models/api/request_io.rb', line 49

def two_dimensional_barcode
  @asset.two_dimensional_barcode if @asset.respond_to?(:two_dimensional_barcode)
end