Class: CustomMetadatumCollection
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- CustomMetadatumCollection
- Includes:
- Uuid::Uuidable
- Defined in:
- app/models/custom_metadatum_collection.rb
Overview
rubocop:todo Style/Documentation
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
Methods included from Warren::BroadcastMessages
#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren
Instance Method Details
#metadata ⇒ Object
10 11 12 |
# File 'app/models/custom_metadatum_collection.rb', line 10 def .collect(&:to_h).inject(:merge!) || {} end |
#metadata=(attributes) ⇒ Object
14 15 16 17 18 19 |
# File 'app/models/custom_metadatum_collection.rb', line 14 def (attributes) ActiveRecord::Base.transaction do .clear attributes.map { |k, v| .build(key: k, value: v) } end end |