Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add move method to parent class refactor #2502

Open
vinistock opened this issue Aug 28, 2024 · 1 comment
Open

Add move method to parent class refactor #2502

vinistock opened this issue Aug 28, 2024 · 1 comment
Labels
enhancement New feature or request help-wanted Extra attention is needed pinned This issue or pull request is pinned and won't be marked as stale server This pull request should be included in the server gem's release notes

Comments

@vinistock
Copy link
Member

Add a new code action to move the selected method implementation to the parent class. For example:

# BEFORE
class Parent
end

class Child < Parent
  def foo
  end
end

# AFTER
class Parent
  def foo
  end
end

class Child < Parent
end

Here's an example PR adding a refactor end to end #2372.

@vinistock vinistock added enhancement New feature or request help-wanted Extra attention is needed pinned This issue or pull request is pinned and won't be marked as stale server This pull request should be included in the server gem's release notes labels Aug 28, 2024
@andyw8
Copy link
Contributor

andyw8 commented Aug 28, 2024

I'd suggest calling this "Pull Up Method" to match the naming in https://refactoring.com/catalog/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help-wanted Extra attention is needed pinned This issue or pull request is pinned and won't be marked as stale server This pull request should be included in the server gem's release notes
Projects
None yet
Development

No branches or pull requests

2 participants