Skip to content

Commit

Permalink
Merge branch 'master' into more-accessibility-cop-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
issyl0 authored Oct 12, 2022
2 parents a899fa2 + fe136a1 commit 9043c3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,8 @@ hsh = {
[Keyword arguments](http://magazine.rubyist.net/?Ruby200SpecialEn-kwarg) are recommended but not required when a method's arguments may otherwise be opaque or non-obvious when called. Additionally, prefer them over the old "Hash as pseudo-named args" style from pre-2.0 ruby.
<a name="keyword-arguments"></a><sup>[[link](#keyword-arguments)]</sup>
``` ruby
So instead of this:
``` ruby
def remove_member(user, skip_membership_check=false)
# ...
Expand All @@ -430,7 +429,8 @@ end
remove_member(user, true)
```
Do this, which is much clearer.
Do this, which is much clearer:
``` ruby
def remove_member(user, skip_membership_check: false)
# ...
Expand Down Expand Up @@ -893,4 +893,4 @@ result = hash.map { |_, v| v + 1 }
Refactoring is even better. It's worth looking hard at any code that explicitly checks types.

[rubocop-guide]: https://github.com/rubocop-hq/ruby-style-guide
[rubocop-guide]: https://github.com/rubocop-hq/ruby-style-guide

0 comments on commit 9043c3e

Please sign in to comment.