Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
CSV
/
//opt/alt/ruby27/share/ri/system/CSV/open-c.ri
U:RDoc::AnyMethod[iI" open:ETI"CSV::open;TT:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"OThis method opens an IO object, and wraps that with CSV. This is intended ;TI"5as the primary interface for writing a CSV file.;To:RDoc::Markup::BlankLine o; ; [I"KYou must pass a +filename+ and may optionally add a +mode+ for Ruby's ;TI"Iopen(). You may also pass an optional Hash containing any +options+ ;TI"2CSV::new() understands as the final argument.;T@o; ; [ I"RThis method works like Ruby's open() call, in that it will pass a CSV object ;TI"Lto a provided block and close it when the block terminates, or it will ;TI"Qreturn the CSV object when no block is provided. (*Note*: This is different ;TI"Gfrom the Ruby 1.8 CSV library which passed rows to the block. Use ;TI"'CSV::foreach() for that behavior.);T@o; ; [I"PYou must provide a +mode+ with an embedded Encoding designator unless your ;TI"Qdata is in Encoding::default_external(). CSV will check the Encoding of the ;TI"Qunderlying IO object (set by the +mode+ you pass) to determine how to parse ;TI"Pthe data. You may provide a second Encoding to have the data transcoded as ;TI"Oit is read just as you can with a normal call to IO::open(). For example, ;TI"M<tt>"rb:UTF-32BE:UTF-8"</tt> would read UTF-32BE data from the file but ;TI"0transcode it to UTF-8 before CSV parses it.;T@o; ; [I"PAn opened CSV object will delegate to many IO methods for convenience. You ;TI"may call:;T@o:RDoc::Markup::List: @type:BULLET:@items[$o:RDoc::Markup::ListItem:@label0; [o; ; [I"binmode();To;;0; [o; ; [I"binmode?();To;;0; [o; ; [I"close();To;;0; [o; ; [I"close_read();To;;0; [o; ; [I"close_write();To;;0; [o; ; [I"closed?();To;;0; [o; ; [I" eof();To;;0; [o; ; [I"eof?();To;;0; [o; ; [I"external_encoding();To;;0; [o; ; [I"fcntl();To;;0; [o; ; [I" fileno();To;;0; [o; ; [I"flock();To;;0; [o; ; [I"flush();To;;0; [o; ; [I"fsync();To;;0; [o; ; [I"internal_encoding();To;;0; [o; ; [I"ioctl();To;;0; [o; ; [I" isatty();To;;0; [o; ; [I"path();To;;0; [o; ; [I" pid();To;;0; [o; ; [I" pos();To;;0; [o; ; [I"pos=();To;;0; [o; ; [I" reopen();To;;0; [o; ; [I"seek();To;;0; [o; ; [I"stat();To;;0; [o; ; [I"sync();To;;0; [o; ; [I"sync=();To;;0; [o; ; [I"tell();To;;0; [o; ; [I"to_i();To;;0; [o; ; [I"to_io();To;;0; [o; ; [I"truncate();To;;0; [o; ; [I"tty?();T: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"�open( filename, mode = "rb", **options ) { |faster_csv| ... } open( filename, **options ) { |faster_csv| ... } open( filename, mode = "rb", **options ) open( filename, **options ) ;TI"csv;T[ I"$(filename, mode="r", **options);T@�FI"CSV;TcRDoc::NormalClass00