Class: Heron::Factories::TubeRackStatus
- Inherits:
-
Object
- Object
- Heron::Factories::TubeRackStatus
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/heron/factories/tube_rack_status.rb
Overview
Factory class to create Heron tube rack statuses
Instance Attribute Summary collapse
-
#barcode ⇒ Object
Returns the value of attribute barcode.
-
#messages ⇒ Object
Returns the value of attribute messages.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
Instance Attribute Details
#barcode ⇒ Object
Returns the value of attribute barcode.
9 10 11 |
# File 'app/models/heron/factories/tube_rack_status.rb', line 9 def @barcode end |
#messages ⇒ Object
Returns the value of attribute messages.
9 10 11 |
# File 'app/models/heron/factories/tube_rack_status.rb', line 9 def @messages end |
#status ⇒ Object
Returns the value of attribute status.
9 10 11 |
# File 'app/models/heron/factories/tube_rack_status.rb', line 9 def status @status end |
Instance Method Details
#save ⇒ Object
15 16 17 18 19 20 |
# File 'app/models/heron/factories/tube_rack_status.rb', line 15 def save return false unless valid? ActiveRecord::Base.transaction { @tube_rack_status = ::TubeRackStatus.create!(barcode:, status:, messages:) } true end |