Class: LabelPrinter::Label::SampleManifestTube
- Defined in:
- lib/label_printer/label/sample_manifest_tube.rb
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
- #first_line(_tube = nil) ⇒ Object
-
#initialize(options) ⇒ SampleManifestTube
constructor
A new instance of SampleManifestTube.
- #tubes ⇒ Object
Methods inherited from BaseTube
#assets, #barcode, #build_label, #date_today, #round_label_bottom_line, #round_label_top_line, #second_line, #third_line
Methods included from MultipleLabels
Constructor Details
#initialize(options) ⇒ SampleManifestTube
Returns a new instance of SampleManifestTube.
7 8 9 10 11 |
# File 'lib/label_printer/label/sample_manifest_tube.rb', line 7 def initialize() super() @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.
5 6 7 |
# File 'lib/label_printer/label/sample_manifest_tube.rb', line 5 def only_first_label @only_first_label end |
#sample_manifest ⇒ Object (readonly)
Returns the value of attribute sample_manifest.
5 6 7 |
# File 'lib/label_printer/label/sample_manifest_tube.rb', line 5 def sample_manifest @sample_manifest end |
Instance Method Details
#first_line(_tube = nil) ⇒ Object
13 14 15 |
# File 'lib/label_printer/label/sample_manifest_tube.rb', line 13 def first_line(_tube = nil) sample_manifest.study.abbreviation end |
#tubes ⇒ Object
17 18 19 20 21 |
# File 'lib/label_printer/label/sample_manifest_tube.rb', line 17 def tubes return [sample_manifest.printables.first] if only_first_label sample_manifest.printables end |