Class: QcableCreator

Inherits:
ApplicationRecord show all
Includes:
Uuid::Uuidable
Defined in:
app/models/qcable_creator.rb

Overview

rubocop:todo Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

Instance Attribute Details

#barcodesObject

Returns the value of attribute barcodes.


12
13
14
# File 'app/models/qcable_creator.rb', line 12

def barcodes
  @barcodes
end

#countObject

Returns the value of attribute count.


12
13
14
# File 'app/models/qcable_creator.rb', line 12

def count
  @count
end

Instance Method Details

#make_qcables!Object


16
17
18
19
# File 'app/models/qcable_creator.rb', line 16

def make_qcables!
  qcables_by_count! if count.present?
  qcables_by_barcode! if barcodes.present?
end