module CSVConverter

CSVConverter groups and transforms tabulated data contained in files such as csv or spreadsheets.

Constants

ALIASES
VERSION

Public Class Methods

add_alias(new_alias, klass) click to toggle source

Adds an alias to the list of aliases @param new_alias [Symbol, String] the name of the alias @param klass [Symbol, String] class name of the converter @return (@see aliases)

# File lib/csv_converter.rb, line 73
def self.add_alias(new_alias, klass)
  @aliases = aliases.merge(new_alias.to_sym => klass.to_s)
end
add_aliases(new_aliases) click to toggle source

Adds one or more alieases to the list of aliases @param new_aliases [Hash] list of aliases to append to the list,

where the key is the name of the alias and the value is the class name of the converter

@return (@see aliases)

# File lib/csv_converter.rb, line 81
def self.add_aliases(new_aliases)
  @aliases = aliases.merge(new_aliases)
end
aliases() click to toggle source

When no custom aliases are included it returns CSVConverter::ALIASES. When custom converter alises are included it returns the whole list of aliases. @return [Hash] list of aliases for each converter class.

# File lib/csv_converter.rb, line 65
def self.aliases
  @aliases || ALIASES
end