Module: ActiveSanction::Parsers

Defined in:
lib/active_sanction/parsers.rb,
lib/active_sanction/parsers/join.rb,
lib/active_sanction/parsers/format.rb,
lib/active_sanction/parsers/spreadsheet.rb,
lib/active_sanction/parsers/xml_records.rb,
lib/active_sanction/parsers/column_shape.rb,
lib/active_sanction/parsers/delimited_table.rb,
lib/active_sanction/parsers/spreadsheet/row.rb,
lib/active_sanction/parsers/spreadsheet/reader.rb,
lib/active_sanction/parsers/xml_records/reader.rb,
lib/active_sanction/parsers/xml_records/record.rb,
lib/active_sanction/parsers/delimited_table/row.rb,
lib/active_sanction/parsers/spreadsheet/archive.rb,
lib/active_sanction/parsers/xml_records/builder.rb,
lib/active_sanction/parsers/spreadsheet/workbook.rb,
lib/active_sanction/parsers/xml_records/backends.rb,
lib/active_sanction/parsers/delimited_table/reader.rb,
lib/active_sanction/parsers/xml_records/backends/rexml.rb,
lib/active_sanction/parsers/xml_records/backends/nokogiri.rb

Overview

The format toolkits adapters parse with. A source declares what its file looks like -- delimiter, column names, null sentinel -- and gets rows back; what those rows mean stays in the adapter, because that is the part no two publishers agree on.

Nothing here knows about Entity. These are file readers, and keeping them ignorant of the canonical model is what lets an adapter for a list nobody here has seen reuse them.

Defined Under Namespace

Classes: ColumnShape, DelimitedTable, Join, Spreadsheet, Warning, XmlRecords

Constant Summary collapse

ParseError =

A payload that could not be read at all: the wrong format, a truncated download, an encoding that cannot be decoded. Distinct from a Warning, which is a row that could not be read while the rest of the file could.

The same class as ActiveSanction::ParseError, under the name the toolkits raise it by. It is declared with the rest of the public hierarchy rather than here because a caller rescuing "this list could not be read" should not have to know which of these toolkits read it -- and because a source adapter parsing a format none of them covers raises the same thing.

ActiveSanction::ParseError