lib/memory_model/collection/index/unique.rb
# `update` should find a record in the collection by its storage_id, remove it, and add with the new value.
`update` should find a record in the collection by its storage_id, remove it, and add with the new value.
` update ` should find a record in the collection by its storage_id remove it and add with the new value .
def update(key, item)
          raise(RecordNotInIndexError, [self, item]) unless exists? item
          delete(item.uuid)
          create(key, item)
        end
def update ( key , item ) raise ( RecordNotInIndexError , [ self , item ] ) unless exists? item delete ( item . uuid ) create ( key , item ) end
`update` should find a record in the collection by its storage_id, remove it, and add with the new value.
` update ` should find a record in the collection by its storage_id remove it and add with the new value .
key
<not_specific>
item
<not_specific>