Class: LabelPrinter::Label::AssetPlate
- Defined in:
- lib/label_printer/label/asset_plate.rb
Instance Attribute Summary collapse
-
#plates ⇒ Object
readonly
Returns the value of attribute plates.
Attributes included from MultipleLabels
Instance Method Summary collapse
- #bottom_right(plate) ⇒ Object
-
#initialize(plates) ⇒ AssetPlate
constructor
A new instance of AssetPlate.
- #top_far_right(plate) ⇒ Object
- #top_right(plate) ⇒ Object
Methods inherited from BasePlate
#assets, #barcode, #bottom_left, #build_label, #date_today, #top_left
Methods included from MultipleLabels
Constructor Details
#initialize(plates) ⇒ AssetPlate
Returns a new instance of AssetPlate.
7 8 9 10 |
# File 'lib/label_printer/label/asset_plate.rb', line 7 def initialize(plates) super() @plates = plates end |
Instance Attribute Details
#plates ⇒ Object (readonly)
Returns the value of attribute plates.
5 6 7 |
# File 'lib/label_printer/label/asset_plate.rb', line 5 def plates @plates end |
Instance Method Details
#bottom_right(plate) ⇒ Object
16 17 18 |
# File 'lib/label_printer/label/asset_plate.rb', line 16 def bottom_right(plate) plate.studies.first&.abbreviation end |
#top_far_right(plate) ⇒ Object
20 21 22 |
# File 'lib/label_printer/label/asset_plate.rb', line 20 def top_far_right(plate) plate.parent.try(:human_barcode).to_s end |
#top_right(plate) ⇒ Object
12 13 14 |
# File 'lib/label_printer/label/asset_plate.rb', line 12 def top_right(plate) plate.plate_purpose.name.to_s end |