The document describes refactoring code in ActionScript 3 (AS3) by extracting methods. Specifically, it shows extracting the rental charge calculation logic from the customer's checkout method into a new amount_for method, then moving that method to the rental class. This improves encapsulation by putting the charge calculation related to a rental in the rental class.