Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
PStore#root?
root?(key)
lib/pstore.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/pstore.rb, line 505
def key?(key)
in_transaction
@table.key? key
end
Alias of #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.