D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
PStore
/
Filename :
fetch-i.ri
back
Copy
U:RDoc::AnyMethod[iI" fetch:ETI"PStore#fetch;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"ELike #[], except that it accepts a default value for the store. ;TI"!If the +key+ does not exist:;To:RDoc::Markup::BlankLine o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"9Raises an exception if +default+ is +PStore::Error+.;To;;0; [o; ; [I".Returns the value of +default+ otherwise:;T@o:RDoc::Markup::Verbatim; [I"example_store do |store| ;TI" store.transaction do ;TI"* store.fetch(:nope, nil) # => nil ;TI"8 store.fetch(:nope) # Raises an exception. ;TI" end ;TI" end ;T:@format0o; ; [I"?Raises an exception if called outside a transaction block.;T: @fileI"lib/pstore.rb;T:0@omit_headings_from_table_of_contents_below000[ I"!(key, default=PStore::Error);T@'FI"PStore;TcRDoc::NormalClass00