Sorbet came out of Stripe, using in-line type annotations.
RBS is an alternative, requires separate files for defining type signatures (not necessarily in files adjacent to classes, you can put all your types in sig/ if you like).
Steep is a gradual type checker that leans on RBS signatures. Autogenerate untyped signatures for most of your classes, and then you can go through them and add actual types. “Easiest way to use RBS” according to Remote Ruby.