File.file?() and File::directory?()
Newbie question here, but in Ruby, why would File.file?() and File::directory?开发者_开发问答() be called differently?
File::file?
and File.file?
are equivalent, as are File::directory?
and File.directory?
. Both are methods belonging to the class, and may be invoked with either syntax.
精彩评论