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 code action to add attribute for instance variable #2503

Open
vinistock opened this issue Aug 28, 2024 · 0 comments
Open

Add code action to add attribute for instance variable #2503

vinistock opened this issue Aug 28, 2024 · 0 comments
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 new code actions to add a new attr_reader, attr_writer or attr_accessor for the given instance variable.

# BEFORE
class Foo
  def initialize
    @name = "Bar"
  end
end

# AFTER
class Foo
  attr_reader :name
 
  def initialize
    @name = "Bar"
  end
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
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

1 participant