tapioca icon indicating copy to clipboard operation
tapioca copied to clipboard

Add DSL Compiler for measured-rails

Open keiththomps opened this issue 3 years ago • 0 comments

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 ✅

keiththomps avatar Mar 09 '22 21:03 keiththomps