The before
method from you linked question is not built into Ruby. Instead, it is a custom built "extension" (in fact, an ordinary module, depending on the actual implementation) that gets included and manipulates some methods, typically be defining a new one with the same name as the old one which does something and then calls the old one.
While this kind of meta-programming is rather easy with ruby, the specific functionality is not a actually Ruby feature. Instead, it is a partial implementation of Aspect Oriented Programming that is possible due to Ruby's meta-programming capabilities.