From: Vincent Foley Date: 2001-11-06T02:21:04+09:00 Subject: [ruby-talk:24404] Help with OO Hi, I'm a bit new to OO programming and I would need help. I made a small (and useless) program to convert a string to l33t speech. But the method I used, I think it's a bit too imperative (we're in a OO language, right?). So here's the code, and I'll explain what I want to do after the code: [code] #!/usr/bin/env ruby def l33t(message) message.tr!('eE', '3') message.tr!('aA', '4') message.tr!('lL', '1') message.tr!('oO', '0') message.tr!('tT', '7') message.tr!('sS', '$5') return message end print "Enter string to translate: " x = STDIN.gets.chomp! puts l33t(x) [/code] look at the last line, how would I do to do 'puts x.l33t'? Thanks, Vince -- Do you want Debian CD's for free? If so, go to http://darkhost.mine.nu:81 and send me a email.