Ruby 1.9.3 Reference Manual > All Libraries > Builtin Library > class File::Stat > rdev

instance method File::Stat#rdev

rdev -> Integer

デバイスタイプ(スペシャルファイルのみ)を返します。

fs = File::Stat.new($0)
#例
p fs.rdev     #=> 2