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

Returns a new instance of Core.



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

def initialize(_manifest)
  # Do nothing
end

Instance Method Details

#acceptable_purposesObject



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

def acceptable_purposes
  PlatePurpose.for_submissions
end

#default_purposeObject



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

def default_purpose
  PlatePurpose.stock_plate_purpose
end

#generateObject

Raises:

  • (StandardError)


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

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

#generate_sample_and_aliquot(sanger_sample_id, asset) ⇒ Object

Raises:

  • (StandardError)


22
23
24
25
26
27
# File 'app/models/sample_manifest/unspecified_behaviour.rb', line 22

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