macro

Ruby Custom Class Macros with Class Instance Variables

Class macros are class methods that are only used when a class is defined. They allow us to dry up shared code at across classes. In this post, we'll build a custom class macro that leverages class instance variables to define class-specific attributes. Shared Code at the Class…