instance method Pathname#dirname

dirname -> Pathname[permalink][rdoc]

Pathname.new(File.dirname(self.to_s)) と同じです。



require "pathname"

Pathname('/usr/bin/shutdown').dirname # => #<Pathname:/usr/bin>

[SEE_ALSO] File.dirname