Skip to content

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)

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?.

See also #key? #path #roots #open_and_lock_file also in 3.4 · 3.3 · 3.1 · 3.0