method
load
Ruby latest stable (v2_5_5)
-
0 notes -
Class: CSV
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
load(io_or_str, options = Hash.new)
public
This method is the reading counterpart to CSV::dump(). See that method for a detailed description of the process.
You can customize loading by adding a class method called csv_load() which will be passed a Hash of meta information, an Array of headers, and an Array of fields for the object the method is expected to return.
Remember that all fields will be Strings after this load. If you need something else, use options to setup converters or provide a custom csv_load() implementation.