D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Array
/
Filename :
at-i.ri
back
Copy
U:RDoc::AnyMethod[iI"at:ETI" Array#at;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"BReturns the element of +self+ specified by the given +index+ ;TI"+or +nil+ if there is no such element; ;TI"+index+ must be an ;TI"a{integer-convertible object}[rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects].;To:RDoc::Markup::BlankLine o; ; [I"OFor non-negative +index+, returns the element of +self+ at offset +index+:;T@o:RDoc::Markup::Verbatim; [ I"a = [:foo, 'bar', 2] ;TI"a.at(0) # => :foo ;TI"a.at(2) # => 2 ;TI"a.at(2.0) # => 2 ;T:@format0o; ; [I"CFor negative +index+, counts backwards from the end of +self+:;T@o;; [I"a.at(-2) # => "bar" ;T; 0o; ; [I"Related: Array#[]; ;TI"Jsee also {Methods for Fetching}[rdoc-ref:Array@Methods+for+Fetching].;T: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I" at(index) -> object or nil ;T0[ I" (p1);T@%FI" Array;TcRDoc::NormalClass00