Registry / utility / csv-mapper

csv-mapper

JSON →
library0.5.1rbrubygemsunverified

CSV Mapper makes it easy to import data from CSV files directly to a collection of any type of Ruby object by declaring attribute mappings.

gem install csv-mapper
INSTALL
IMPORT
SIG · CSV-MAPPER
C
csv-mapper
utilityrubyv0.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CsvMapper
require 'csv-mapper'

Map CSV columns to Ruby object attributes.

require 'csv-mapper' class User; attr_accessor :name, :email; end mapper = CsvMapper::Mapper.new(User) mapper.map_columns('name', 'email') users = mapper.parse('users.csv') puts users.first.name
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.1latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Resources
csv-mapper — gem install csv-mapper · libregistry