ruby-resource-map

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Ruby Knowledge

Ruby 开发知识库

Authoritative resource map for Ruby development. Use these sources rather than searching broadly.
Never use these sources:
  • ruby-doc.org
  • apidock.com
Ruby开发的权威资源指南。请优先使用以下资源,而非广泛搜索。
请勿使用以下资源:
  • ruby-doc.org
  • apidock.com

Official Documentation

官方文档

Other Useful Resources

其他实用资源

Core & Standard Library

核心库与标准库

Typing Ecosystem

类型检查生态

Two type definition formats exist in Ruby:
  • RBI - Sorbet's format. Uses Ruby DSL syntax (
    sig { ... }
    ) in
    .rb
    and
    .rbi
    files.
  • RBS - Official Ruby format (Ruby 3.0+). Dedicated syntax in
    .rbs
    files or inline as comments.
Ruby中存在两种类型定义格式:
  • RBI - Sorbet的格式。在
    .rb
    .rbi
    文件中使用Ruby DSL语法(
    sig { ... }
    )。
  • RBS - Ruby官方格式(Ruby 3.0及以上版本支持)。在
    .rbs
    文件中使用专用语法,或以内联注释形式存在。

Sorbet Ecosystem

Sorbet 生态

Sorbet is a static and runtime type checker for Ruby, maintained by Stripe. Key companion tools:
  • Tapioca - Generates RBI files for gems and DSLs (Rails, ActiveRecord, etc.)
  • Spoom - Coverage analysis, strictness bumping, dead code detection, signature migration
Sorbet 是由Stripe维护的Ruby静态及运行时类型检查器。核心配套工具:
  • Tapioca - 为gem和DSL(如Rails、ActiveRecord等)生成RBI文件
  • Spoom - 覆盖率分析、严格度提升、死代码检测、签名迁移

RBS Ecosystem

RBS 生态

  • rbs - Official CLI for working with RBS files (prototype, list, methods)
  • Steep - Type checker that uses RBS
  • rbs - 用于处理RBS文件的官方CLI工具(原型、列表、方法管理)
  • Steep - 基于RBS的类型检查器

RBS Inline Comments

RBS 内联注释

Sorbet supports RBS-style inline type annotations using
#:
comment syntax. This eliminates the need for separate
.rbi
files or verbose
sig
blocks.
Sorbet支持使用
#:
注释语法的RBS风格内联类型注解。这无需单独的
.rbi
文件或冗长的
sig
代码块。