In Listing 2, I reopen the Numericclass (which handles both fixed and floating-point Numbers) to add the gram and pound methods.
在清单2中,我重新打开了numeric类(其处理固定和浮点数字)以便添加gram和pound方法。
3
Rails provides reasonable definitions of blank? For several other objects too: true, false, empty arrays or hashes, numeric types, and even the object class.