3 ms·
Takes a bit of setup to monkey-patch String, but: class String def to_pn Pathname.new(self) end end fail "bad arg" unless
by jitl 8y ago
Takes a bit of setup to monkey-patch String, but:
class String
def to_pn
Pathname.new(self)
end
end
fail "bad arg" unless dir = ARGV.shift&.to_pn