Class: DS::Source::DSCSV

Inherits:
BaseSource show all
Defined in:
lib/ds/source/ds_csv.rb

Constant Summary collapse

TYPE =
DS::Constants::DS_CSV

Instance Method Summary collapse

Methods inherited from BaseSource

#load_source, #source_type, #to_s

Methods included from SourceCache

#cache, #find_or_open_source, #max_cache_size, #max_cache_size=

Instance Method Details

#open_source(source_file_path) ⇒ CSV

Opens a CSV file at the specified source_file_path and returns a CSV object.

Parameters:

  • source_file_path (String)

    The path to the CSV file.

Returns:

  • (CSV)

    A CSV object representing the opened CSV file.



13
14
15
# File 'lib/ds/source/ds_csv.rb', line 13

def open_source source_file_path
  CSV.open(source_file_path, 'r', headers: true)
end