module _ToPath

A type thatโ€™s convertible to a String that contains a filepath.

Implicit .to_path conversions are usable throughout Rubyโ€™s stdlib, whenever a file path is expected, such as Dir#mkdir, File#open, and UNIXSocket#read. These functions, however, also accept types that define .to_str. See the path type alias.