This is useful for application that incorrectly use ' as the quote character instead of the correct ".
CSV will pass this Struct to some blocks that make decisions based on field structure. 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.
Each row is yielded to the provided block which can alter it as needed. If the passed object does not respond to match, ArgumentError is thrown.
If your data cannot be transcoded to UTF-8 the conversion will fail and the header will remain unchanged. Options cannot be overridden in the instance methods for performance reasons, so be sure to set what you want here.
CSV will check the Encoding of the underlying IO object set by the mode you pass to determine how to parse the data. You pass a path and any options you wish to set for the read. If you pass a String for data, you can later retrieve it after writing to it, for example with CSV.