method

executable?

v1_8_7_330 - Show latest stable - Class: File::Stat
executable?()
public

Returns true if stat is executable or if the operating system doesn’t distinguish executable files from nonexecutable files. The tests are made using the effective owner of the process.

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