Class: LabelPrinter::Label::SampleManifestPlate
- Defined in:
- lib/label_printer/label_printer/label/sample_manifest_plate.rb
Overview
rubocop:todo Style/Documentation
Instance Attribute Summary collapse
-
#only_first_label ⇒ Object
readonly
Returns the value of attribute only_first_label.
-
#sample_manifest ⇒ Object
readonly
Returns the value of attribute sample_manifest.
Attributes included from MultipleLabels
Instance Method Summary collapse
- #bottom_right(plate) ⇒ Object
-
#initialize(options) ⇒ SampleManifestPlate
constructor
A new instance of SampleManifestPlate.
- #plates ⇒ Object
- #top_right(_plate = nil) ⇒ Object
Methods inherited from BasePlate
#assets, #barcode, #bottom_left, #create_label, #date_today, #top_far_right, #top_left
Methods included from MultipleLabels
#create_labels, #label, #labels, #to_h
Constructor Details
#initialize(options) ⇒ SampleManifestPlate
Returns a new instance of SampleManifestPlate.
6 7 8 9 |
# File 'lib/label_printer/label_printer/label/sample_manifest_plate.rb', line 6 def initialize() @sample_manifest = [:sample_manifest] @only_first_label = [:only_first_label] end |
Instance Attribute Details
#only_first_label ⇒ Object (readonly)
Returns the value of attribute only_first_label
4 5 6 |
# File 'lib/label_printer/label_printer/label/sample_manifest_plate.rb', line 4 def only_first_label @only_first_label end |
#sample_manifest ⇒ Object (readonly)
Returns the value of attribute sample_manifest
4 5 6 |
# File 'lib/label_printer/label_printer/label/sample_manifest_plate.rb', line 4 def sample_manifest @sample_manifest end |
Instance Method Details
#bottom_right(plate) ⇒ Object
15 16 17 |
# File 'lib/label_printer/label_printer/label/sample_manifest_plate.rb', line 15 def bottom_right(plate) "#{sample_manifest.study.abbreviation} #{plate.}" end |
#plates ⇒ Object
19 20 21 22 23 |
# File 'lib/label_printer/label_printer/label/sample_manifest_plate.rb', line 19 def plates return [sample_manifest.printables.first] if only_first_label sample_manifest.printables end |
#top_right(_plate = nil) ⇒ Object
11 12 13 |
# File 'lib/label_printer/label_printer/label/sample_manifest_plate.rb', line 11 def top_right(_plate = nil) @sample_manifest.purpose.name end |