From: Sy Ali Date: 2006-05-15T10:24:10+09:00 Subject: Columnization of text, using text-reform Ok, I got text-hyphen and text-reform installed[1], and I looked at the test case for text-reform. Yes, that's a great way to start learning stuff. I also found a way to adapt it to my uses![2] This is a major victory. Except.. I have no idea how to break it free from test/unit It has to do with these two things, I'm sure of it. I know they set up the r. in the r.format statements.. but I don't know what's going on, what they're called or how to learn more about them. =) attr_reader :r @r = Text::Reform.new [1] http://rubyforge.org/frs/?group_id=294 [2] http://jrandomhacker.info/Sls The working script is: $LOAD_PATH.unshift "../lib" if __FILE__ == $0 require 'test/unit' require 'text/reform' class Test__Text_Reform < Test::Unit::TestCase attr_reader :r def setup @r = Text::Reform.new end def test_abiglongtext filename1 = "This is a long filename" description1 = "desc" filename2 = "Filename" description2 = "This is a long description" filename3 = "This is a long filename" description3 = "This is a particularly long description" output = "" output << "------------------------\n" output << r.format("[[[[[[[[[[[ [[[[[[[[[[[", filename1, description1) output << "------------------------\n" output << r.format("[[[[[[[[[[[ [[[[[[[[[[[", filename2, description2) output << "------------------------\n" output << r.format("[[[[[[[[[[[ [[[[[[[[[[[", filename3, description3) output << "------------------------\n" puts output end end