Frank Guerino wrote:
> I'd like to pass the log file into a Class I've defined so I can print
> to the logFile from inside Class methods.  I try to pass in the log file
> like I would any other variable but I get error messages.  Is there a
> specific syntax that I should be using?
> 
> class MyClass
>   def initialize stringOne, stringTwo, logFile
>     ...
>   end
> end
> 
> The above class yields errors when I try to invoke it using:
> 
>     newMyClass = MyClass.new stringA, stringB, logFile
> 
> I've tried to find documentation that talks about passing Files as
> arguments to methods and to classes but can't seem to find anything
> obvious.  Any thoughts?
> 
> Thanks for your help, in advance!
> 
> Frank

logFile is a just a regular variable like everything else, there's no
special syntax for using it just because it refers to a File object.
Your assignment should work; whats the actual error message and the
actual code that causes it?
-- 
Posted via http://www.ruby-forum.com/.