csv_grid.rb

Path: grid/csv_grid.rb
Last Update: Tue May 20 11:09:45 -0300 2008

Grid::CSV allows you to import data from a csv file.

Example

 grid=Grid::CSV.new :width => 2
 grid.column :title => "User", :align => :right
 grid.column :title => "Password", :format => lambda{|v| (v.to_s == "x") ? "Yes" : "No"}
 grid.column :title => "UID", :width => 1
 grid.column :title => "GID"
 grid.column :title => "Gecos", :width => 2.5
 grid.column :title => "Home Dir", :width => 4
 grid.column :title => "Shell"
 grid.style  :bottom_lines
 grid.data("/etc/passwd",/:/)

[Validate]