Skip to content
ccdavis edited this page Sep 13, 2010 · 2 revisions

The purpose of the Ruff project is to make parsing and creating data in fixed width text format as easy and fast as possible while using pure Ruby. Ruff consists of a single Ruby gem for now.

The most useful aspect of Ruff is the ability to read and generate data with multiple record types in one set of data. Usually this sort of data is hierarchical in structure, though it need not be. For example:

H1972000064
P051102
P031102
P251201
H1972000064
P090202
P350101

The above data represents a series of households with the people living in them. The data on the ‘H’ record is common to the whole household while the ‘P’ data is unique to each person.

Survey or census data may be stored in a similar format.

Ruff will make it easy to, for example, import this type of data into a database.

Another use for Ruff is when you need to export data into a format used by legacy systems. Ruff will let you create data files with multiple record types or just one, which is most common.

Clone this wiki locally