Class: LabelPrinter::Label::BatchPlate
- Includes:
- BatchPlates
- Defined in:
- lib/label_printer/label/batch_plate.rb
Instance Attribute Summary collapse
-
#batch ⇒ Object
readonly
Returns the value of attribute batch.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#printable ⇒ Object
readonly
Returns the value of attribute printable.
Instance Method Summary collapse
- #bottom_right(plate) ⇒ Object
-
#initialize(options) ⇒ BatchPlate
constructor
A new instance of BatchPlate.
- #top_right(_plate = nil) ⇒ Object
Methods included from BatchPlates
Methods inherited from BasePlate
#assets, #barcode, #bottom_left, #build_label, #date_today, #plates, #top_far_right, #top_left
Methods included from MultipleLabels
Constructor Details
#initialize(options) ⇒ BatchPlate
Returns a new instance of BatchPlate.
11 12 13 14 15 16 |
# File 'lib/label_printer/label/batch_plate.rb', line 11 def initialize() super() @count = [:count].to_i @printable = [:printable] @batch = [:batch] end |
Instance Attribute Details
#batch ⇒ Object (readonly)
Returns the value of attribute batch.
9 10 11 |
# File 'lib/label_printer/label/batch_plate.rb', line 9 def batch @batch end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
9 10 11 |
# File 'lib/label_printer/label/batch_plate.rb', line 9 def count @count end |
#printable ⇒ Object (readonly)
Returns the value of attribute printable.
9 10 11 |
# File 'lib/label_printer/label/batch_plate.rb', line 9 def printable @printable end |
Instance Method Details
#bottom_right(plate) ⇒ Object
22 23 24 |
# File 'lib/label_printer/label/batch_plate.rb', line 22 def bottom_right(plate) "#{batch.output_plate_role} #{batch.output_plate_purpose.name} #{plate.}" end |
#top_right(_plate = nil) ⇒ Object
18 19 20 |
# File 'lib/label_printer/label/batch_plate.rb', line 18 def top_right(_plate = nil) batch.studies.first.abbreviation end |