Builtin functions like File.open honor Pathname objects, and it would be great if this library did as well. This can be as simple as attaching a .to_s to any incoming function argument used as a path, or even rewriting sections of the API to leverage Pathname directly.
Ruby supports Pathname objects which are more appropriate than strings for encoding paths (or more bluntly: paths aren't strings).
Builtin functions like
File.open
honorPathname
objects, and it would be great if this library did as well. This can be as simple as attaching a.to_s
to any incoming function argument used as a path, or even rewriting sections of the API to leveragePathname
directly.e.g. this function https://github.com/swipely/docker-api/blob/d0d12c41eb736240551250ed2cfd261ad43f144c/lib/docker/util.rb#L136-L143
Could be rewritten