Skip to main content

Ruby extractor

The Ruby extractor maps tree-sitter Ruby CST nodes to canonical concepts. Class and module names come from the name field on constants; method names from the name field on identifiers.

Detected concepts

Example

Renaming a method:
Running differens old.rb new.rb:

Known limitations

  • Dynamic method definition (define_method) is a call, not a method: names built at runtime are invisible to the extractor.
  • true, false, and nil are anonymous tokens in the grammar, so there are no named boolean or null literal nodes to report.