Class: LabelPrinter::Label::MultiplexedTube

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

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, #round_label_bottom_line, #round_label_top_line

Methods included from MultipleLabels

#create_labels, #label, #labels, #to_h

Constructor Details

#initialize(options) ⇒ MultiplexedTube

Returns a new instance of MultiplexedTube


6
7
8
9
# File 'lib/label_printer/label_printer/label/multiplexed_tube.rb', line 6

def initialize(options)
  @tubes = options[:assets]
  @count = options[:count]
end

Instance Attribute Details

#tubesObject (readonly)

Returns the value of attribute tubes


4
5
6
# File 'lib/label_printer/label_printer/label/multiplexed_tube.rb', line 4

def tubes
  @tubes
end

Instance Method Details

#middle_line(tube) ⇒ Object


15
16
17
# File 'lib/label_printer/label_printer/label/multiplexed_tube.rb', line 15

def middle_line(tube)
  tube.human_barcode
end

#top_line(tube) ⇒ Object


11
12
13
# File 'lib/label_printer/label_printer/label/multiplexed_tube.rb', line 11

def top_line(tube)
  tube.name_for_label.to_s
end