Module: SampleManifest::CoreBehaviour

Included in:
SampleManifest
Defined in:
app/models/sample_manifest/core_behaviour.rb

Defined Under Namespace

Modules: LibraryAssets, NoSpecializedValidation, Shared, StockAssets

Constant Summary collapse

BEHAVIOURS =
%w[1dtube plate multiplexed_library library library_plate].freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


50
51
52
53
54
55
56
57
58
# File 'app/models/sample_manifest/core_behaviour.rb', line 50

def self.included(base)
  base.class_eval do
    delegate :details, :details_array, :validate_specialized_fields, :specialized_fields, to: :core_behaviour

    def self.supported_asset_type?(asset_type)
      asset_type.nil? || BEHAVIOURS.include?(asset_type)
    end
  end
end

Instance Method Details

#core_behaviourObject


60
61
62
# File 'app/models/sample_manifest/core_behaviour.rb', line 60

def core_behaviour
  @core_behaviour ||= "::SampleManifest::#{behaviour_module}::Core".constantize.new(self)
end