Class: NdrImport::NonTabular::Mapping
- Defined in:
- lib/ndr_import/non_tabular/mapping.rb
Overview
This class stores the mapping used to break an incoming file into multiple rows/records
Constant Summary
Constants inherited from Table
Table::NON_TABULAR_OPTIONS, Table::TABULAR_ONLY_OPTIONS
Instance Attribute Summary
Attributes inherited from Table
Attributes inherited from Table
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ Mapping
constructor
A new instance of Mapping.
Methods inherited from Table
#footer_lines, #header_lines, #tablename_pattern=, #transform, #validate_header, #validate_presence_of_start_line_pattern
Methods inherited from Table
#all_valid_options, #encode_with, #header_valid?, #match, #process_line, #transform, #transform_line
Constructor Details
#initialize(options) ⇒ Mapping
Returns a new instance of Mapping.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ndr_import/non_tabular/mapping.rb', line 12 def initialize() non_tabular_mappings = ['non_tabular_row'] if non_tabular_mappings initialize_non_tabular_mappings(non_tabular_mappings) else # validate presence of non_tabular_row fail NdrImport::MappingError, I18n.t('mapping.errors.missing_non_tabular_row') end super() end |
Class Method Details
.all_valid_options ⇒ Object
8 9 10 |
# File 'lib/ndr_import/non_tabular/mapping.rb', line 8 def self. super + %w(non_tabular_row) end |