From: Jason Mayer Date: 2006-12-23T02:46:02+09:00 Subject: Nuby question regarding classes and ARGV ------=_Part_42464_192662.1166809559775 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I just took a program that works using a command line argument and turned it into a class so that I could require it from . Anyway, I was just wondering how you would pass somethign to it now as an argument. if the syntax of the original program was 'ruby program.rb Jason' and the program did stuff with 'Jason', how would I go about making another program (a GUI for example) pass along information into that program as an argument? I can't seem to get this to work. I've tried variants of the following: psuedo code (saved as program2.rb): 'require program.rb' b = 'Jason' a = ClassNameInProgram.new(b) a = ClassNameInProgram.new {b} a = ClassNameInProgram.new b If I run 'ruby program2.rb Jason', I get the same output as if I'd run ' program.rb Jason'. What am I not doing correctly? Hopefully I've explained this adequately and hopefully I'm not being incredibly stupid. ------=_Part_42464_192662.1166809559775--