End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
PStore#root?
root?(key)
lib/pstore.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/pstore.rb, line 509
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.
PStore#root? is an alias for PStore#key?.