home -> String | nil[permalink][rdoc]home(user) -> String | nil現在のユーザまたは指定されたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は File.expand_path("~") や File.expand_path("~root") とほぼ同じです。
例:
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
[SEE_ALSO] File.expand_path