📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 16:02:24
📂
/ (Root)
/
opt
/
alt
/
ruby30
/
share
/
ri
/
system
/
Hash
📍 /opt/alt/ruby30/share/ri/system/Hash
🔄 Refresh
✏️
Editing: fetch_values-i.ri
Read Only
U:RDoc::AnyMethod[iI"fetch_values:ETI"Hash#fetch_values;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"UReturns a new \Array containing the values associated with the given keys *keys:;To:RDoc::Markup::Verbatim; [I""h = {foo: 0, bar: 1, baz: 2} ;TI",h.fetch_values(:baz, :foo) # => [2, 0] ;T:@format0o; ; [I"6Returns a new empty \Array if no arguments given.;To:RDoc::Markup::BlankLine o; ; [I"CWhen a block is given, calls the block with each missing key, ;TI"Atreating the block's return value as the value for that key:;To;; [I""h = {foo: 0, bar: 1, baz: 2} ;TI"Fvalues = h.fetch_values(:bar, :foo, :bad, :bam) {|key| key.to_s} ;TI"&values # => [1, 0, "bad", "bam"] ;T;0o; ; [I"OWhen no block is given, raises an exception if any given key is not found.;T: @fileI"hash.c;T:0@omit_headings_from_table_of_contents_below0I"^hash.fetch_values(*keys) -> new_array hash.fetch_values(*keys) {|key| ... } -> new_array ;T0[ I"(*args);T@"FI" Hash;TcRDoc::NormalClass00
💾 Save Changes
❌ Cancel