Yes. The problem is that b.attributes *outputs* a string instead of 
returning it (at least in the code you posted first). So the attributes 
are displayed before the actual "puts" is executed, while the 
"b.attributes" expression simply returns nil.

You'll simply have to change the "attributes" method. Outputting should 
generally be restricted to either the top level or prominent methods. 
All other methods should *return* their value.

-- 
Posted via http://www.ruby-forum.com/.