U:RDoc::AnyMethod[iI" open:EFI"CSV::open;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"PThis 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::BlankLineo; ; [I"KYou must pass a +filename+ and may optionally add a +mode+ for Ruby's ;TI"Jopen(). 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"Rreturn the CSV object when no block is provided. (*Note*: This is different ;TI"Hfrom 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"Rdata 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"Rthe data. You may provide a second Encoding to have the data transcoded as ;TI"Pit is read just as you can with a normal call to IO::open(). For example, ;TI"M"rb:UTF-32BE:UTF-8" would read UTF-32BE data from the file but ;TI"0transcode it to UTF-8 before CSV parses it.;T@o; ; [I"QAn 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 = Hash.new ) { |faster_csv| ... } open( filename, options = Hash.new ) { |faster_csv| ... } open( filename, mode = "rb", options = Hash.new ) open( filename, options = Hash.new ) ;TI"csv;T[I" (*args);T@ÁFI"CSV;TcRDoc::NormalClass00