tapioca
tapioca copied to clipboard
Add DSL Compiler for measured-rails
Motivation
One of Shopify's other gems, measured-rails, generates dynamic methods that obviously won't play nice with sorbet unless proper .rbi files are generated for. I could use this for one of our Shopify internal apps that I'm adding more sorbet signatures to.
Implementation
Mostly learned from how the other ActiveRecord DSL compilers are built. The implementation is pretty simple as measured-rails builds up a hash with the generated field name and corresponding value class name.
Tests
Tests added ✅