Module: RowBoat::Helpers Private

Defined in:
lib/row_boat/helpers.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Constant Summary collapse

CSV_OPTION_KEYS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

%i[
  chunk_size
  col_sep
  comment_regexp
  convert_values_to_numeric
  downcase_header
  file_encoding
  force_simple_split
  force_utf8
  headers_in_file
  invalid_byte_sequence
  keep_original_headers
  key_mapping
  quote_char
  remove_empty_hashes
  remove_empty_values
  remove_unmapped_keys
  remove_values_matching
  remove_zero_values
  row_sep
  skip_lines
  strings_as_keys
  strip_chars_from_headers
  strip_whitespace
  user_provided_headers
  value_converters
  verbose
].freeze
IMPORT_OPTION_KEYS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

%i[
  batch_size
  ignore
  on_duplicate_key_ignore
  recursive
  synchronize
  timestamps
  validate
].freeze

Class Method Summary collapse

Class Method Details

.extract_csv_options(options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



46
47
48
# File 'lib/row_boat/helpers.rb', line 46

def extract_csv_options(options)
  options.slice(*CSV_OPTION_KEYS)
end

.extract_import_options(options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



50
51
52
# File 'lib/row_boat/helpers.rb', line 50

def extract_import_options(options)
  options.slice(*IMPORT_OPTION_KEYS)
end