[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: A small refractory problem

James Byrne

2/22/2006 2:56:00 PM


Please forgive the missing _ in the first example.
The code should be:
>
> def move(sourcedir,globspec,targetdir,suf=nil)
>
> if sourcedir.kind_of?(self.class) then sourcedir = sourcedir.path end
> sourcedir = File.expand_path(sourcedir.to_s)
> if !self.validpath?(sourcedir) then
> raise ArgumentError, "Source directory invalid", caller
> end
>
> if targetdir.kind_of?(self.class) then targetdir = targetdir.path end
> targetdir = File.expand_path(targetdir.to_s)
> if !self.validpath?(targetdir) then
> raise ArgumentError, "Target directory invalid", caller
> end
>



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