Skip to content

Conversation

@takaokouji
Copy link

Summary

This PR refactors the Ruby-to-blocks converter infrastructure by renaming method registration functions for better consistency and clarity.

Changes Made

  • Core Method Renamings:

    • registerCallMethodregisterOnSend
    • registerCallMethodWithBlockregisterOnSendWithBlock
    • registerCallMyBlockregisterOnSendMyBlock
  • Files Updated:

    • Updated core implementation in index.js
    • Refactored all core converters: Motion, Looks, Sound, Event, Control, Sensing, Operators, Variables, MyBlocks
    • Updated all extension converters: MicroBit, Video, Music, Pen, EV3, Boost, etc. (13+ extension files)
    • Total: 23 files modified with 278 insertions/deletions

Benefits

  • Improved Naming Convention: Method names now better reflect their purpose in handling Ruby send operations
  • Enhanced Code Maintainability: More descriptive and intuitive method names for developers
  • Consistent API Design: Unified naming pattern across the entire converter infrastructure
  • Zero Breaking Changes: All existing functionality preserved

Testing

  • ✅ All converter unit tests pass
  • ✅ MyBlocks converter tests specifically verified
  • ✅ No functional changes, only method name updates

Implementation Details

The refactoring systematically updated:

  1. Core method definitions in the RubyToBlocksConverter class
  2. All method calls across converter implementations
  3. Maintained backward compatibility throughout
  4. Used batch operations for extension converters to ensure consistency

This improvement addresses the need for clearer, more consistent naming in the Ruby-to-blocks converter infrastructure, making the codebase more maintainable and developer-friendly.

Closes #402

🤖 Generated with Claude Code

takaokouji and others added 3 commits September 10, 2025 23:23
…rter

Updates all registerCallMethod usages to registerOnSend for consistent naming.

Related to #402
Updates all registerCallMethod usages to registerOnSend for consistent naming.

Related to #402
- Renamed registerCallMethod to registerOnSend
- Renamed registerCallMethodWithBlock to registerOnSendWithBlock
- Renamed registerCallMyBlock to registerOnSendMyBlock
- Updated all converter files to use new method names
- Updated core implementation in index.js
- Ensures consistent naming convention across codebase

This refactoring improves code maintainability and provides clearer
method names that better reflect their purpose in handling Ruby send
operations.

Addresses GitHub issue #402

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@takaokouji takaokouji merged commit f7685b4 into develop Sep 10, 2025
2 checks passed
@takaokouji takaokouji deleted the refactor/register-on-send-naming branch September 10, 2025 15:53
github-actions bot pushed a commit that referenced this pull request Sep 10, 2025
…ster-on-send-naming

refactor: rename registerCallMethod* to registerOnSend* for consistency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Rename registerCallMethod* to registerOnSend* for consistent naming

2 participants