Posted By: Ken Date
Date: 2007-03-20 22:55
Summary: SimpleCSV 0.1.3
Project: SimpleCSV
Version 0.1.3 has been released. Experimental feature. You can define callback method on subclass.
just example...
class PrintFirstLetterParser < SimpleCSV
def on_field(str, pr)
print "#{str[0, 1]} "
end
def on_row(str, pr)
end
end
PrintFirstLetterParser.new.parse(<<_CSV_)
first, second, third, fourth, fifth
_CSV_
#=> f s t f f |
|