January 2024
Intermediate to advanced
718 pages
20h 15m
English
RBS has its own syntax for defining Ruby types. The definitive source for the syntax reference is found at https://github.com/ruby/rbs/blob/master/docs/syntax.md. We’ll go over the structure here.
RBS syntax has a few main parts (we’re adopting the naming convention from the official syntax file):
Declarations are class, module, and interface structures that can be used as types in other parts of the file.
Members are things that are inside declarations that might have type information, including instance variables, attributes, and methods.
Types are the things that RBS uses to specify actual type information, including class names, union of class names, or literal types, as well as a few RBS-specific ...
Read now
Unlock full access