At a previous role, we used DryStructs for this, which seemed like a nice way of getting:<p><pre><code> * named variables
* type validation
* better documented code
</code></pre>
<a href="https://dry-rb.org/gems/dry-struct/1.6/" rel="nofollow">https://dry-rb.org/gems/dry-struct/1.6/</a>