ruby / ruby/rbs

Handling Classes created with Data#define

Open
#1,563 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
2.2k
Forks
256
Avg merge
6d 17h
Merged PRs (30d)
37

Description

The dynamic nature of defining Data classes with Data#define makes it difficult (if not impossible) to adequately describe scripts using RBS.
If it indeed is impossible, perhaps we should consider a specific syntax for Data classes in RBS. Yes, they are dynamically created classes, so checking is tough, but it is odd to have a first class, core library feature not supported by RBS.
If it is possible and I simply did not know, perhaps updating the tutorial to better discuss how to do this would be very helpful

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names Ruby's Data#define and RBS but no files, tests, or entry points. First investigate whether dynamically defined Data classes can be described with existing RBS syntax; if not, assess the scope of a dedicated syntax. Done means either documenting the supported approach in the tutorial or defining and implementing a clear support path.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.