Sha256: 7a1e01459c3453a6eaa05d0115c0da855252d696be7b750068e327615627ce3d
Contents?: true
Size: 475 Bytes
Versions: 14
Compression:
Stored size: 475 Bytes
Contents
# relabel a single input file # * assuming that input file has a single header line # * assuming that input file is in valid CSV format (no validation) class Masticate::Relabel < Masticate::Base def configure(opts) standard_options(opts) @fields = opts[:fields] or raise "missing fieldnames for relabel" end def relabel(opts) execute(opts) end def crunch(row) if !@headers @headers = @fields row = @headers end row end end
Version data entries
14 entries across 14 versions & 1 rubygems