Convert YARD docs to Sorbet RBI and Ruby 3/Steep RBS files
Sord is a Sorbet and YARD crossover. It can automatically generate RBI and RBS type signature files by looking at the types specified in YARD documentation comments.If your project is already YARD documented, then this can generate most of the type signatures you need!Sord is the perfect way to jump-start the adoption of types in your project, whether you plan to use Sorbet's RBI format or Ruby 3/Steep's RBS format.Sord has the following features:Automatically generates signatures for modules, classes and methodsSupport for multiple parameter or return types (T.any/|)Gracefully handles missing YARD types (T.untyped/untyped)Can infer setter parameter type from the corresponding getter's return typeRecognises mixins (include and extend)Support for generic types such as Array
Convert YARD docs to Sorbet RBI and Ruby 3/Steep RBS files #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/convert-yard-docs-to-sorbet-rbi-and-ruby-3-steep-rbs-files