Module: ImportEverything

Defined in:
lib/import_everything/preview.rb,
lib/import_everything/parser/parser.rb,
lib/import_everything/determine_type.rb,
lib/import_everything/parser/line_parser.rb,
lib/import_everything/parsers/csv_parser.rb,
lib/import_everything/parsers/sql_parser.rb,
lib/import_everything/parsers/xml_parser.rb,
lib/import_everything/parsers/yaml_parser.rb,
lib/import_everything/parsers/table_parser.rb,
lib/import_everything/parser/module_methods.rb,
lib/import_everything/parsers/sqlite_parser.rb

Defined Under Namespace

Modules: IterationHelpers, ParserPreviewMod Classes: CsvParser, DetermineType, DisplayTable, LineParser, Parser, Preview, SqlInsertParser, SqliteParser, TableParser, XmlParser, YamlParser

Class Method Summary collapse

Class Method Details

.each_row(ops, &b) ⇒ Object



9
10
11
# File 'lib/import_everything/parser/module_methods.rb', line 9

def self.each_row(ops,&b)
  get_parser(ops).each_row(&b)
end

.each_table_and_rows(ops, &b) ⇒ Object



12
13
14
# File 'lib/import_everything/parser/module_methods.rb', line 12

def self.each_table_and_rows(ops,&b)
  get_parser(ops).each_table_and_rows(&b)
end

.get_parser(ops) ⇒ Object



2
3
4
5
# File 'lib/import_everything/parser/module_methods.rb', line 2

def self.get_parser(ops)
  dt = ImportEverything::DetermineType.new(ops)
  dt.parser
end

.get_rows(ops) ⇒ Object



6
7
8
# File 'lib/import_everything/parser/module_methods.rb', line 6

def self.get_rows(ops)
  get_parser(ops).cleaned_row_hashes
end

.preview(ops) ⇒ Object



15
16
17
# File 'lib/import_everything/parser/module_methods.rb', line 15

def self.preview(ops)
  Preview.new(ops)
end