Skip to content

fix(STYLEGUIDE.md): remove extra opening code block #115

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

Merged
merged 2 commits into from
Oct 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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