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


47
48
49
# File 'app/models/api/request_io.rb', line 47

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

Instance Attribute Details

#assetObject (readonly)

Returns the value of attribute asset


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

def asset
  @asset
end

Instance Method Details

#two_dimensional_barcodeObject


51
52
53
# File 'app/models/api/request_io.rb', line 51

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