Embedding it into Ruby code
summary
An experimental gem embeds RBS type declarations as comments inside Ruby files, extracts them into generated .rbs files, and runs existing Steep/type-check tools so the edit→type-check cycle no longer requires switching files. It supports common constructs (param and return annotations), three inline styles compact, doc and return syntaxes, attribute and constant typing with double-colon attribute syntax, and an escape hatch for full RBS via RBS inline gem; prototype lacks IDE completions and inline error diagnostics.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 3:23About the speaker
- 4:07RBS type checking basics
- 10:33Reasons for separate RBS files
- 13:25Problems with separate files
- 14:12Introducing RBS inline
- 18:12RBS inline demo
- 19:40RBS inline benefits
- 20:44Designing RBS inline syntax
- 25:58Syntax comparisons
- 28:05Future plans and call for feedback
related talks
53mAn introduction to typed Ruby programming
22mStatic typing with RBS in Ruby
37mChecking Your Types: An Overview of Ruby's Type System
32mThe State of Ruby 3 Typing
36mAn introduction to typed Ruby programming
32mDo LLMs dream of Type Inference?
39mType Checking Ruby Programs with Annotations
39mIDE development with Ruby
