Method: Fech::Filing#parse_filing_version

Defined in:
lib/fech/filing.rb

#parse_filing_versionObject

Pulls out the version number from the header line. Must parse this line manually, since we don’t know the version yet, and thus the delimiter type is still a mystery.



223
224
225
226
227
228
229
230
# File 'lib/fech/filing.rb', line 223

def parse_filing_version
  first = File.open(file_path).first
  if first.index("\034").nil?
    @csv_parser.parse(first).flatten[2]
  else
    @csv_parser.parse(first, :col_sep => "\034").flatten[2]
  end
end