Clio::Layout
Currently the table layout class is very simplistic. Ultimately it will support headers, footers, and a varity of border options.
# File lib/clio/layout/table.rb, line 17 def initialize(*rows_of_cells, &block) @rows = rows_of_cells end
# File lib/clio/layout/table.rb, line 26 def cell(acell) (@rows.last ||= []) << acell end
# File lib/clio/layout/table.rb, line 21 def row(*cells, &block) @rows << cells instance_eval(&block) end
# File lib/clio/layout/table.rb, line 30 def to_s #screen_width rows.collect{ |cells| cells.join(' ') }.join("\n") end
[Validate]
Generated with the Darkfish Rdoc Generator 2.