Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby C
Failed to load latest commit information.
ext/bamfcsv Add custom separator support
lib Release 0.3.2
spec
tasks rake spec is the secret sauce for web scale
.gitignore Update README and Gemfile.lock
.rspec rake spec is the secret sauce for web scale
.travis.yml add travis
Gemfile Gem happiness.
Gemfile.lock Gemfile.lock
README Update README for custom separators
Rakefile rake spec is the secret sauce for web scale
bamfcsv.gemspec rake spec is the secret sauce for web scale

README

BAMFCSV -- Parsin' CSVs like a BAMF!

$ gem install bamfcsv
$ irb -rbamfcsv
irb> BAMFCSV.read "super_giant.csv"
===> ...large array of arrays...

BAMF!!! CSV IS PARSED IN LESS THAN ONE SECOND! GUARANTEED!*

also:
BAMFCSV.parse "csv,string,of,awesome"

AND! both #parse and #read take an optional :headers => true to generate a table!

irb(1.9.2): table = BAMFCSV.parse <<EOF, headers: true
         ?> foo,bar
         ?> 1,2
         ?> 3,4
         ?> EOF
==========> #<BAMFCSV::Table>
irb(1.9.2): table.first["foo"]
==========> "1"
irb(1.9.2): table[1]["bar"]
==========> "4"

DOUBLE-AND/ALSO it supports custom field separators!!

irb(1.9.2): BAMFCSV.parse(<<EOF, separator: '|')
         ?> foo|bar
         ?> baz|quux
         ?> EOF
==========> [["foo", "bar"], ["baz", "quux"]]


(*) Results may vary.
Something went wrong with that request. Please try again.