Class: CSVR::CLI
- Inherits:
-
Thor
- Object
- Thor
- CSVR::CLI
- Defined in:
- lib/csvr/cli.rb
Instance Method Summary collapse
Instance Method Details
#api ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/csvr/cli.rb', line 8 def api outputs = [] outputs << "\t require 'csvr' " outputs << "\tcsvr = CSVR.open('path/to/file')" outputs << "\t(optional) csvr.headers = ['array','of','custom', 'headers]" outputs << "\t(optional) csvr.rows = ['array', 'of' 'strings' 'to' 'parse']" outputs << "\tcsvr.create('db_name', 'table_name')" outputs.each { |x| puts x } end |