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

Auto-correct class-level trivial accessors #1124

Merged
merged 1 commit into from
May 30, 2014

Conversation

ggilder
Copy link
Contributor

@ggilder ggilder commented May 29, 2014

cc @tamird

def autocorrect_class(node)
_, method_name, args, body = *node
return unless names_match?(method_name, body)
kind = if trivial_writer?(method_name, args, body)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could extract this

@bbatsov
Copy link
Collaborator

bbatsov commented May 30, 2014

👍 Looks good.

bbatsov added a commit that referenced this pull request May 30, 2014
…sors

Auto-correct class-level trivial accessors
@bbatsov bbatsov merged commit 282b5f1 into rubocop:master May 30, 2014
@ggilder ggilder deleted the ggilder/autocorrect-class-accessors branch May 30, 2014 17:46
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.

3 participants