Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

PStore#key?

(K name) -> bool
key?(key)

Returns true if key exists, false otherwise:

Example
example_store do |store|
  store.transaction do
    store.key?(:foo) # => true
  end
end

Raises an exception if called outside a transaction block.