⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.25
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
/
CSV
/
Table
/
View File Name :
values_at-i.ri
U:RDoc::AnyMethod[iI"values_at:ETI"CSV::Table#values_at;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"BIf the access mode is <tt>:row</tt> or <tt>:col_or_row</tt>, ;TI":and each argument is either an \Integer or a \Range, ;TI"returns rows. ;TI"%Otherwise, returns columns data.;To:RDoc::Markup::BlankLine o; ; [I":In either case, the returned values are in the order ;TI"<specified by the arguments. Arguments may be repeated.;T@S:RDoc::Markup::Rule:weighti@o; ; [I"4Returns rows as an \Array of \CSV::Row objects.;T@o; ; [I"No argument:;To:RDoc::Markup::Verbatim; [I"2source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" ;TI".table = CSV.parse(source, headers: true) ;TI"table.values_at # => [] ;T:@format0o; ; [I"One index:;To;; [I"!values = table.values_at(0) ;TI"8values # => [#<CSV::Row "Name":"foo" "Value":"0">] ;T;0o; ; [I"Two indexes:;To;; [I"$values = table.values_at(2, 0) ;TI"^values # => [#<CSV::Row "Name":"baz" "Value":"2">, #<CSV::Row "Name":"foo" "Value":"0">] ;T;0o; ; [I"One \Range:;To;; [I"$values = table.values_at(1..2) ;TI"^values # => [#<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"baz" "Value":"2">] ;T;0o; ; [I"\Ranges and indexes:;To;; [I"0values = table.values_at(0..1, 1..2, 0, 2) ;TI"pp values ;T;0o; ; [I"Output:;To;; [I",[#<CSV::Row "Name":"foo" "Value":"0">, ;TI", #<CSV::Row "Name":"bar" "Value":"1">, ;TI", #<CSV::Row "Name":"bar" "Value":"1">, ;TI", #<CSV::Row "Name":"baz" "Value":"2">, ;TI", #<CSV::Row "Name":"foo" "Value":"0">, ;TI", #<CSV::Row "Name":"baz" "Value":"2">] ;T;0S;; i@o; ; [I")Returns columns data as row Arrays, ;TI"@each consisting of the specified columns data for that row:;To;; [ I"&values = table.values_at('Name') ;TI"-values # => [["foo"], ["bar"], ["baz"]] ;TI"/values = table.values_at('Value', 'Name') ;TI";values # => [["0", "foo"], ["1", "bar"], ["2", "baz"]];T;0: @fileI"lib/csv/table.rb;T:0@omit_headings_from_table_of_contents_below0I"ctable.values_at(*indexes) -> array_of_rows table.values_at(*headers) -> array_of_columns_data ;T0[ I"(*indices_or_headers);T@TFI" Table;TcRDoc::NormalClass00