Method: Ethel::Sources::CSV#initialize
- Defined in:
- lib/ethel/sources/csv.rb
#initialize(options = {}) ⇒ CSV
Returns a new instance of CSV.
4 5 6 7 8 9 10 |
# File 'lib/ethel/sources/csv.rb', line 4 def initialize( = {}) if [:string] @data = ::CSV.parse([:string], :headers => true) elsif [:file] @data = ::CSV.read([:file], :headers => true) end end |