Class: LabelPrinter::Label::SampleManifestTube
- Defined in:
- lib/label_printer/label_printer/label/sample_manifest_tube.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
-
#initialize(options) ⇒ SampleManifestTube
constructor
A new instance of SampleManifestTube.
- #top_line(_tube = nil) ⇒ Object
- #tubes ⇒ Object
Methods inherited from BaseTube
#assets, #barcode, #bottom_line, #create_label, #date_today, #middle_line, #round_label_bottom_line, #round_label_top_line
Methods included from MultipleLabels
#create_labels, #label, #labels, #to_h
Constructor Details
#initialize(options) ⇒ SampleManifestTube
Returns a new instance of SampleManifestTube.
6 7 8 9 |
# File 'lib/label_printer/label_printer/label/sample_manifest_tube.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_tube.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_tube.rb', line 4 def sample_manifest @sample_manifest end |
Instance Method Details
#top_line(_tube = nil) ⇒ Object
11 12 13 |
# File 'lib/label_printer/label_printer/label/sample_manifest_tube.rb', line 11 def top_line(_tube = nil) sample_manifest.study.abbreviation end |
#tubes ⇒ Object
15 16 17 18 19 |
# File 'lib/label_printer/label_printer/label/sample_manifest_tube.rb', line 15 def tubes return [sample_manifest.printables.first] if only_first_label sample_manifest.printables end |