Class: Api::V2::TubeRackResource

Inherits:
BaseResource
  • Object
show all
Defined in:
app/resources/api/v2/tube_rack_resource.rb

Overview

Provides a JSON API representation of TubeRack See: jsonapi-resources.com/ for JSONAPI::Resource documentation

Instance Method Summary collapse

Methods inherited from BaseResource

apply_includes, default_includes, #fetchable_fields, inclusions, resolve_relationship_names_to_relations, updatable_fields

Instance Method Details

#labware_barcodeObject

Custom methods These shouldn't be used for business logic, and are more about I/O and isolating implementation details.


43
44
45
46
47
48
49
# File 'app/resources/api/v2/tube_rack_resource.rb', line 43

def labware_barcode
  {
    'ean13_barcode' => _model.ean13_barcode,
    'machine_barcode' => _model.machine_barcode,
    'human_barcode' => _model.human_barcode
  }
end