Describe the feature
Add Ruby as a supported target language for jsii-rosetta, so the TypeScript example snippets embedded in CDK documentation are transliterated to idiomatic Ruby (for Construct Hub and inline docs), alongside the existing Python / Java / C# / Go renderers.
Part of the coordinated Ruby language support effort:
Proposed solution
A new RubyVisitor (src/languages/ruby.ts) that walks the TypeScript AST and renders idiomatic Ruby, registered as the RUBY target — the same visitor contract the other languages implement. Covered by translation fixtures and unit tests.
Scope & safety
- Strictly additive — a new visitor plus a target-enum entry; no existing language's output changes.
- Self-contained — the visitor has no dependency on the Ruby-capable jsii compiler, so the rosetta test suite passes on its own.
- Follows the established convention for
src/languages/* visitors, so it is reviewable against the Python/Java precedent.
References
Describe the feature
Add Ruby as a supported target language for jsii-rosetta, so the TypeScript example snippets embedded in CDK documentation are transliterated to idiomatic Ruby (for Construct Hub and inline docs), alongside the existing Python / Java / C# / Go renderers.
Part of the coordinated Ruby language support effort:
jsii-pacmakRuby target: feat(ruby): Ruby language bindings jsii#5178Proposed solution
A new
RubyVisitor(src/languages/ruby.ts) that walks the TypeScript AST and renders idiomatic Ruby, registered as theRUBYtarget — the same visitor contract the other languages implement. Covered by translation fixtures and unit tests.Scope & safety
src/languages/*visitors, so it is reviewable against the Python/Java precedent.References