Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
PStore#delete
(K name) -> V?
delete(key)
lib/pstore.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/pstore.rb, line 476
def delete(key)
in_transaction_wr
@table.delete key
end
Removes and returns the value at key if it exists:
Example
example_store do |store| store.transaction do store[:bat] = 3 store.delete(:bat) end end
Returns nil if there is no such key.
Raises an exception if called outside a transaction block.