CsvOption
'csv_options' is rubygem for determing various options passed to CSV parser. It determine options automatically.
Installation
Add this line to your application's Gemfile:
gem 'csv_option'And then execute:
$ bundle
Or install it yourself as:
$ gem install csv_option
Usage
utils = CsvOption::Utils.new("#{fixture_path}/test.csv")Determine column separator:
utils.determine_column_separatorDetermine headers of csv file(Assuming the firstline will always be header)
utils.parse_headersDeterming row options
utils.determine_row_separatorContributing
- Fork it ( https://github.com/narutosanjiv/csv_option/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request