Class: SampleManifest::UnspecifiedBehaviour::Core

Inherits:
Object
  • Object
show all
Defined in:
app/models/sample_manifest/unspecified_behaviour.rb

Instance Method Summary collapse

Constructor Details

#initialize(_manifest) ⇒ Core


5
6
7
# File 'app/models/sample_manifest/unspecified_behaviour.rb', line 5

def initialize(_manifest)
  # Do nothing
end

Instance Method Details

#acceptable_purposesObject


9
10
11
# File 'app/models/sample_manifest/unspecified_behaviour.rb', line 9

def acceptable_purposes
  PlatePurpose.for_submissions
end

#default_purposeObject


13
14
15
# File 'app/models/sample_manifest/unspecified_behaviour.rb', line 13

def default_purpose
  PlatePurpose.stock_plate_purpose
end

#generateObject

Raises:

  • (StandardError)

17
18
19
# File 'app/models/sample_manifest/unspecified_behaviour.rb', line 17

def generate
  raise StandardError, 'UnspecifiedBehaviour can not be used to build manifests'
end

#generate_sample_and_aliquot(sanger_sample_id, asset) ⇒ Object

Raises:

  • (StandardError)

21
22
23
# File 'app/models/sample_manifest/unspecified_behaviour.rb', line 21

def generate_sample_and_aliquot(sanger_sample_id, asset)
  raise StandardError, "UnspecifiedBehaviour can not be used to create Sample: #{sanger_sample_id}, for Asset: #{asset.display_name}."
end