Module: LabelPrinter::Label::MultipleLabels
- Included in:
- BasePlate, BaseTube, MultipleDoubleLabels
- Defined in:
- lib/label_printer/label/multiple_labels.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#count ⇒ Object
22 23 24 |
# File 'lib/label_printer/label/multiple_labels.rb', line 22 def count (@count || 1).to_i end |
Instance Method Details
#create_labels ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/label_printer/label/multiple_labels.rb', line 13 def create_labels [].tap do |l| assets.each do |asset| label = build_label(asset) count.times { l.push(label) } end end end |
#labels ⇒ Object
7 8 9 10 11 |
# File 'lib/label_printer/label/multiple_labels.rb', line 7 def labels return [] unless assets create_labels end |