⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.13
Server IP:
109.199.105.153
Server:
Linux connect.inboxifs.com 5.15.0-152-generic #162-Ubuntu SMP Wed Jul 23 09:48:42 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Array
/
Edit File: fetch-i.ri
U:RDoc::AnyMethod[iI" fetch:ETI"Array#fetch;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I",Returns the element at offset +index+.;To:RDoc::Markup::BlankLine o; ; [I"0With the single \Integer argument +index+, ;TI"+returns the element at offset +index+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.fetch(1) # => "bar" ;T:@format0o; ; [I">If +index+ is negative, counts from the end of the array:;To;; [I"a = [:foo, 'bar', 2] ;TI"a.fetch(-1) # => 2 ;TI"a.fetch(-2) # => "bar" ;T; 0o; ; [I"1With arguments +index+ and +default_value+, ;TI"Areturns the element at offset +index+ if index is in range, ;TI"'otherwise returns +default_value+:;To;; [I"a = [:foo, 'bar', 2] ;TI" a.fetch(1, nil) # => "bar" ;T; 0o; ; [I"(With argument +index+ and a block, ;TI"@returns the element at offset +index+ if index is in range ;TI"f(and the block is not called); otherwise calls the block with index and returns its return value:;T@o;; [I"a = [:foo, 'bar', 2] ;TI"<a.fetch(1) {|index| raise 'Cannot happen' } # => "bar" ;TI"Da.fetch(50) {|index| "Value for #{index}" } # => "Value for 50";T; 0: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"}array.fetch(index) -> element array.fetch(index, default_value) -> element array.fetch(index) {|index| ... } -> element ;T0[ I"(p1, p2 = v2);T@2FI" Array;TcRDoc::NormalClass00
Simpan