Skip to content

Commit

Permalink
Merge pull request #115 from github/francisfuzz/fix-keyword-arguments…
Browse files Browse the repository at this point in the history
…-code-block

fix(STYLEGUIDE.md): remove extra opening code block
  • Loading branch information
francisfuzz authored Oct 11, 2022
2 parents d1266dc + 21268ee commit fe136a1
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 fe136a1

Please sign in to comment.