DRY up your domain models using a struct table

Refactoring Ruby: DRY up your domain models using a struct table

In the screencast and blog post below, you’ll watch over the shoulder of RubyTapas guest chef Sam Livingston-Gray as he uses Ruby’s Struct class, the Vim editor, and some clever formatting to rearrange his view of a refactoring problem. Each individual step will appear simple by itself… but the end result seems almost miraculous.

https://www.rubytapas.com/2016/12/05/refactoring-ruby-dry-domain-models-struct-table/