https://github.com/arpith/kurangu
Runtime type collection for Ruby
https://github.com/arpith/kurangu
Last synced: about 1 year ago
JSON representation
Runtime type collection for Ruby
- Host: GitHub
- URL: https://github.com/arpith/kurangu
- Owner: arpith
- License: mit
- Created: 2018-02-17T23:17:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-06T18:51:53.000Z (about 8 years ago)
- Last Synced: 2025-04-16T07:07:19.505Z (about 1 year ago)
- Language: Ruby
- Size: 43.9 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kurangu
Runtime type collection for Ruby
## Installation
`gem install kurangu`
## Usage
`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.
## How It Works
Kurangu uses [TracePoints](http://ruby-doc.org/core-2.5.0/TracePoint.html) 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](https://github.com/plum-umd/rdl#intersection-types) for the type checker.