Jan E. wrote in post #1067264:
> Hi,
>
> You don't have to pass the ARGV to the initialize method, but I'd do it
> anyway, because it shows that the class uses the command line options.
> It simply makes the code clearer.
>
> Apart from that: I think you shouldn't empty ARGV by using
> opts_obj.parse!. Other parts of the program might actually need those
> information. And I don't like the "run" method, because it isn't clear
> that you can only use it once. Why don't you put it in the initialize
> method?

Thanks for the reply Jan. I agree that passing arguments explicitly
makes code cleaner and hence it makes sense to take this approach.

Also, I liked your suggestion of calling the 'run' method or other
methods in it from the initialize method. Thanks for the extra pointers.

- neubyr

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