feat: add class insertion button to Ruby tab More menu#292
Merged
takaokouji merged 2 commits intodevelopfrom Mar 13, 2026
Merged
feat: add class insertion button to Ruby tab More menu#292takaokouji merged 2 commits intodevelopfrom
takaokouji merged 2 commits intodevelopfrom
Conversation
Add a standalone utility that wraps existing Ruby code with a class definition, replicating the RubyGenerator._wrapWithClass logic for forFileOutput=true. Includes 18 unit tests covering sprite/stage targets, set_xxx generation, and class detection. Refs #291 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a menu item in the More (⋯) menu that wraps the current editor code with a class definition. Uses executeEdits for Undo support. Includes Japanese translations (kanji + hiragana). Refs #291 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🚀 Preview deployed: https://smalruby.jp/smalruby3-editor/feature/insert-class-button/ |
github-actions bot
pushed a commit
that referenced
this pull request
Mar 13, 2026
…t-class-button feat: add class insertion button to Ruby tab More menu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ruby タブの More メニュー(⋯)に「クラスを挿入」アイテムを追加。ワンクリックで現在のコードを class で包む。
RubyGenerator._wrapWithClass(forFileOutput=true)と同等のロジックで:set_xxxを追加executeEditsを使用し Undo 対応Implementation Steps
insert-class.js) + 18 unit testsTest Plan
wrapCurrentCodeWithClassCloses #291