method_object
Convert a complex method into a method object class whose call holds the method body, with the original method delegating to it. Preview changes first; set apply=true to write.
Instructions
Convert a method into a method object: a new class whose call holds the method body, with the original method delegating to it — a stepping stone for decomposing a complex method. Point at the method name (0-based LSP line/character, UTF-16 units) and name the new class. Defaults to a Dry Run preview; set apply=true to write. Supply expected_symbol when edits may have intervened since your LSP answer, so a stale Position fails safely. Read the method with your LSP first; this tool only changes code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| line | Yes | ||
| root | No | ||
| apply | No | ||
| character | Yes | ||
| class_name | Yes | ||
| expected_symbol | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||