⚝
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
/
Edit File: delete_if-i.ri
U:RDoc::AnyMethod[iI"delete_if:ETI"CSV::Table#delete_if;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"IRemoves rows or columns for which the block returns a truthy value; ;TI"returns +self+.;To:RDoc::Markup::BlankLine o; ; [I"QRemoves rows when the access mode is <tt>:row</tt> or <tt>:col_or_row</tt>; ;TI"0calls the block with each \CSV::Row object:;To:RDoc::Markup::Verbatim; [I"2source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" ;TI".table = CSV.parse(source, headers: true) ;TI";table.by_row! # => #<CSV::Table mode:row row_count:4> ;TI"table.size # => 3 ;TI";table.delete_if {|row| row['Name'].start_with?('b') } ;TI"table.size # => 1 ;T:@format0o; ; [I"<Removes columns when the access mode is <tt>:col</tt>; ;TI";calls the block with each column as a 2-element array ;TI":containing the header and an \Array of column fields:;To;; [I"2source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" ;TI".table = CSV.parse(source, headers: true) ;TI";table.by_col! # => #<CSV::Table mode:col row_count:4> ;TI"table.headers.size # => 2 ;TI"Ctable.delete_if {|column_data| column_data[1].include?('2') } ;TI"table.headers.size # => 1 ;T; 0o; ; [I"4Returns a new \Enumerator if no block is given:;To;; [I"2source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" ;TI".table = CSV.parse(source, headers: true) ;TI"\table.delete_if # => #<Enumerator: #<CSV::Table mode:col_or_row row_count:4>:delete_if>;T; 0: @fileI"lib/csv/table.rb;T:0@omit_headings_from_table_of_contents_below00I"header, self;T[ I" (&block);T@1FI" Table;TcRDoc::NormalClass00
Simpan