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#roots

roots

Alias of #keys

Returns an array of the existing keys:

Example
example_store do |store|
  store.transaction do
    store.keys # => [:foo, :bar, :baz]
  end
end

Raises an exception if called outside a transaction block.

PStore#roots is an alias for PStore#keys.

See also #keys #root? #save_data #path also in 3.4 · 3.3 · 3.1 · 3.0