diff options
Diffstat (limited to 'lib/pstore.rb')
-rw-r--r-- | lib/pstore.rb | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/pstore.rb b/lib/pstore.rb index 8d7137aa39..57ecb0ef5c 100644 --- a/lib/pstore.rb +++ b/lib/pstore.rb @@ -71,7 +71,7 @@ require "digest" # when the store is created (see PStore.new). # The objects are stored and retrieved using # module Marshal, which means that certain objects cannot be added to the store; -# see {Marshal::dump}[https://docs.ruby-lang.org/en/master/Marshal.html#method-c-dump]. +# see {Marshal::dump}[rdoc-ref:Marshal.dump]. # # == Entries # @@ -79,11 +79,11 @@ require "digest" # Each entry has a key and a value, just as in a hash: # # - Key: as in a hash, the key can be (almost) any object; -# see {Hash Keys}[https://docs.ruby-lang.org/en/master/Hash.html#class-Hash-label-Hash+Keys]. +# see {Hash Keys}[rdoc-ref:Hash@Hash+Keys]. # You may find it convenient to keep it simple by using only # symbols or strings as keys. # - Value: the value may be any object that can be marshalled by \Marshal -# (see {Marshal::dump}[https://docs.ruby-lang.org/en/master/Marshal.html#method-c-dump]) +# (see {Marshal::dump}[rdoc-ref:Marshal.dump]) # and in fact may be a collection # (e.g., an array, a hash, a set, a range, etc). # That collection may in turn contain nested objects, @@ -194,7 +194,7 @@ require "digest" # end # # And recall that you can use -# {dig methods}[https://docs.ruby-lang.org/en/master/dig_methods_rdoc.html] +# {dig methods}[rdoc-ref:dig_methods.rdoc] # in a returned hierarchy of objects. # # == Working with the Store @@ -326,7 +326,7 @@ require "digest" # end # class PStore - VERSION = "0.1.1" + VERSION = "0.1.3" RDWR_ACCESS = {mode: IO::RDWR | IO::CREAT | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze RD_ACCESS = {mode: IO::RDONLY | IO::BINARY, encoding: Encoding::ASCII_8BIT}.freeze @@ -437,7 +437,7 @@ class PStore in_transaction unless @table.key? key if default == PStore::Error - raise PStore::Error, format("undefined key `%s'", key) + raise PStore::Error, format("undefined key '%s'", key) else return default end @@ -487,8 +487,6 @@ class PStore # end # # Raises an exception if called outside a transaction block. - # - # PStore#roots is an alias for PStore#keys. def keys in_transaction @table.keys @@ -504,8 +502,6 @@ class PStore # end # # Raises an exception if called outside a transaction block. - # - # PStore#root? is an alias for PStore#key?. def key?(key) in_transaction @table.key? key @@ -521,8 +517,8 @@ class PStore end # Exits the current transaction block, committing any changes - # specified in the transaction block. - # See {Committing or Aborting}[rdoc-ref:PStore@Committing+or+Aborting]. + # specified in the + # {transaction block}[rdoc-ref:PStore@The+Transaction+Block]. # # Raises an exception if called outside a transaction block. def commit @@ -532,8 +528,8 @@ class PStore end # Exits the current transaction block, discarding any changes - # specified in the transaction block. - # See {Committing or Aborting}[rdoc-ref:PStore@Committing+or+Aborting]. + # specified in the + # {transaction block}[rdoc-ref:PStore@The+Transaction+Block]. # # Raises an exception if called outside a transaction block. def abort |