Runtime type collection for Ruby
gem install kurangu
kurangu input.rb
where input.rb
is the file you want annotations for 😊
By default, Kurangu generates annotations for files in the same directory as the input file.
Kurangu uses TracePoints to listen to method calls and returns, and to collect the runtime types for the arguments and return values.
Then, using the method’s parameter information, it creates signatures for each call and updates the annotations file. The signatures are used to create an intersection type for the type checker.