January 2024
Intermediate to advanced
718 pages
20h 15m
English
The official Ruby typing system is called RBS (short for Ruby Signature). With RBS, you create a separate file that contains type signature information for all or part of your code.
To take a look at how RBS works, we’ll use the gem we created in Writing and Packaging Your Own Code into Gems, and augment it with RBS typing. If you look at the Aaagmnr gem code, you’ll see that it contains a directory named sig that we didn’t talk much about. That directory is where you’re supposed to put the type information, and right now it contains one file:
| | module Aaagmnr |
| | VERSION: String |
| | # See the writing guide of rbs: https://github.com/ruby/rbs#guides |
| | end |
The only thing this file ...
Read now
Unlock full access