Class: Labels::TubeLabel

Inherits:
Base
  • Object
show all
Defined in:
app/models/labels/tube_label.rb

Overview

rubocop:todo Style/Documentation

Direct Known Subclasses

TubeLabelTractionCompatible

Instance Method Summary collapse

Instance Method Details

#attributesObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/models/labels/tube_label.rb', line 4

def attributes
  # we have to remove first two characters from name (normally it is 'DN'),
  # because otherwise we will lose important information about wells
  # if each well takes 3 (not 2) characters, like E10:H10, for example
  {
    first_line: first_line,
    second_line: second_line,
    third_line: labware.purpose_name,
    fourth_line: date_today,
    round_label_top_line: labware.barcode.prefix,
    round_label_bottom_line: labware.barcode.number,
    barcode: labware.barcode.ean13
  }
end

#default_label_templateObject



23
24
25
# File 'app/models/labels/tube_label.rb', line 23

def default_label_template
  default_label_template_for(:tube)
end

#default_printer_typeObject



19
20
21
# File 'app/models/labels/tube_label.rb', line 19

def default_printer_type
  default_printer_type_for(:tube)
end

#default_sprint_label_templateObject



27
28
29
# File 'app/models/labels/tube_label.rb', line 27

def default_sprint_label_template
  default_sprint_label_template_for(:tube)
end