Class: CSVR::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/csvr/cli.rb

Instance Method Summary collapse

Instance Method Details

#apiObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/csvr/cli.rb', line 8

def api 

	outputs = []
	outputs << "\trequire 'csvr' "
		outputs << "\tcsvr = CSVR.open('path/to/file')"
		outputs << "\t(optional) csvr.headers = ['array','of', 'headers]"
	outputs << "\t(optional) csvr.filters = ['array', 'of' 'strings' 'to' 'parse']"
	outputs << "\tcsvr.create('db_name', 'table_name')"

	puts "\n"
	outputs.each { |x| puts x }
	puts "\n"

end