--- !ruby/object:RDoc::RI::MethodDescription 
aliases: []

block_params: csv
comment: 
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: This method opens an IO object, and wraps that with CSV. This is intended as the primary interface for writing a CSV file.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: You must pass a <tt>filename</tt> and may optionally add a <tt>mode</tt> for Ruby's open(). You may also pass an optional Hash containing any <tt>options</tt> CSV::new() understands as the final argument.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "This method works like Ruby's open() call, in that it will pass a CSV object to a provided block and close it when the block terminates, or it will return the CSV object when no block is provided. (<b>Note</b>: This is different from the Ruby 1.8 CSV library which passed rows to the block. Use CSV::foreach() for that behavior.)"
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: You must provide a <tt>mode</tt> with an embedded Encoding designator unless your data is in Encoding::default_external(). CSV will check the Encoding of the underlying IO object (set by the <tt>mode</tt> you pass) to deterime how to parse the data. You may provide a second Encoding to have the data transcoded as it is read just as you can with a normal call to IO::open(). For example, <tt>&quot;rb:UTF-32BE:UTF-8&quot;</tt> would read UTF-32BE data from the file but transcode it to UTF-8 before CSV parses it.
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "An opened CSV object will delegate to many IO methods for convenience. You may call:"
- !ruby/object:RDoc::Markup::Flow::LIST 
  contents: 
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: binmode()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: binmode?()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: close()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: close_read()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: close_write()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: closed?()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: eof()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: eof?()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: external_encoding()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: fcntl()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: fileno()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: flock()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: flush()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: fsync()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: internal_encoding()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: ioctl()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: isatty()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: path()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: pid()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: pos()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: pos=()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: reopen()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: seek()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: stat()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: sync()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: sync=()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: tell()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: to_i()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: to_io()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: truncate()
  - !ruby/struct:RDoc::Markup::Flow::LI 
    :label: "*"
    :body: tty?()
  type: :BULLET
full_name: CSV::open
is_singleton: true
name: open
params: |
  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 )

visibility: public
