Class: LabelPrinter::Label::SampleManifestMultiplex

Inherits:
BaseTube
  • Object
show all
Defined in:
lib/label_printer/label_printer/label/sample_manifest_multiplex.rb

Overview

rubocop:todo Style/Documentation

Instance Attribute Summary collapse

Attributes included from MultipleLabels

#count

Instance Method Summary collapse

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) ⇒ SampleManifestMultiplex

Returns a new instance of SampleManifestMultiplex.


7
8
9
10
# File 'lib/label_printer/label_printer/label/sample_manifest_multiplex.rb', line 7

def initialize(options)
  @sample_manifest = options[:sample_manifest]
  @only_first_label = options[:only_first_label]
end

Instance Attribute Details

#sample_manifestObject (readonly)

Returns the value of attribute sample_manifest.


5
6
7
# File 'lib/label_printer/label_printer/label/sample_manifest_multiplex.rb', line 5

def sample_manifest
  @sample_manifest
end

Instance Method Details

#top_line(_tube = nil) ⇒ Object


12
13
14
# File 'lib/label_printer/label_printer/label/sample_manifest_multiplex.rb', line 12

def top_line(_tube = nil)
  sample_manifest.study.abbreviation
end

#tubesObject


16
17
18
# File 'lib/label_printer/label_printer/label/sample_manifest_multiplex.rb', line 16

def tubes
  [sample_manifest.printables]
end