Tech
Ruby Pathname Moved to Core, Documentation Upgraded
In release 4.0, the Ruby Powers-That-Be have brought class Pathname into the Ruby core. This is a Very Good Thing.
Through its many instance methods, a Pathname object provides a consistent and convenient interface to numerous methods in other classes and modules:
Wraps almost all methods in class File and module FileTest .
Wraps some methods in class Dir and module FileUtils .
Advantages of using Pathname instead of these others:
You don’t have to know which clas...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to