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

Expound on alias vs alias_method appropriateness #383

Merged
merged 1 commit into from
Dec 5, 2014

Conversation

marxarelli
Copy link
Contributor

Provides examples of when alias is more appropriate than alias_method and vice versa, as discussed in issue #377.

@bbatsov
Copy link
Collaborator

bbatsov commented Dec 4, 2014

I think we're off to a good start here, but I think we can do a bit better:

  • we should mention something about the aliasing and inheritance
  • I think we should suggest the use of bareword params for alias and symbols for alias_method whenever possible (as opposed to symbols and strings)

@marxarelli
Copy link
Contributor Author

Fixed it up a bit and incorporated your suggestions. Do you think the explanation of aliasing and inheritance is clear enough?

@@ -2447,6 +2447,73 @@ condition](#safe-assignment-in-condition).
end
```

* <a name="alias-method-lexically"></a>

Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove this blank line.

Added examples of when one is more appropriate over the other, and notes
about aliasing and inheritance.
bbatsov added a commit that referenced this pull request Dec 5, 2014
Expound on `alias` vs `alias_method` appropriateness
@bbatsov bbatsov merged commit bcad2e7 into rubocop:master Dec 5, 2014
@bbatsov
Copy link
Collaborator

bbatsov commented Dec 5, 2014

👍

marocchino pushed a commit to marocchino/ruby-style-guide that referenced this pull request Aug 11, 2015
Expound on `alias` vs `alias_method` appropriateness
shyouhei pushed a commit to shyouhei/ruby-style-guide that referenced this pull request Nov 11, 2015
Expound on `alias` vs `alias_method` appropriateness
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.

None yet

3 participants