Class: V1::Pacbio::AliquotResource

Inherits:
AliquotResource show all
Includes:
Shared::RunSuitability
Defined in:
app/resources/v1/pacbio/aliquot_resource.rb

Overview

Note:

Access this resource via the /v1/pacbio/aliquots/ endpoint.

Provides a JSON:API representation of Pacbio::Aliquot.

Direct Known Subclasses

Runs::AliquotResource

Constant Summary collapse

POLYMORPHIC_TYPES =

We could move this to a concern and dynamically build the polymorphic types but no need to do this unless we use this for any other pipelines for now this is best in here as it is specific to pacbio

%w[pacbio/requests pacbio/pools pacbio/libraries].freeze

Instance Attribute Summary

Attributes inherited from AliquotResource

#aliquot_type, #concentration, #insert_size, #source_id, #source_type, #state, #tag_id, #template_prep_kit_box_barcode, #used_by_id, #used_by_type, #volume

Class Method Summary collapse

Methods included from Shared::RunSuitability

#run_suitability

Class Method Details

.resource_klass_for(type) ⇒ Object

Aliquot polymorphism support. This fixes the polymorphic relationships in json-api resources as json-api resources underscores and pluralizes the type



29
30
31
# File 'app/resources/v1/pacbio/aliquot_resource.rb', line 29

def self.resource_klass_for(type)
  super(type.underscore.pluralize.gsub('pacbio/', ''))
end