method

socket?

v1_8_6_287 - Show latest stable - Class: File::Stat
socket?()
public

Returns true if stat is a socket, false if it isn’t or if the operating system doesn’t support this feature.

   File.stat("testfile").socket?   #=> false