franzejr / best-ruby

Ruby Tricks, Idiomatic Ruby, Refactoring and Best Practices
http://franzejr.github.io/best-ruby/
2.39k stars 219 forks source link

Add options_hash_with_defaults.md #68

Closed abarrak closed 7 years ago

franzejr commented 7 years ago

I don't think this a trick, since you are just using Hash options. This is just a feature of hashes..pass options.

abarrak commented 7 years ago

My opinion is that it's a pracrice, and common one in ruby world.

http://codereview.stackexchange.com/questions/39017/setting-defaults-in-a-ruby-options-hash

franzejr commented 7 years ago

@abarrak, sorry. I thought you were adding this to the tricks part. I've just opened the PR. Can you add also an entry to the README/List where we have all the idiomatic items ?

Thanks one more time!

franzejr commented 7 years ago

Thanks, @abarrak. Can you solve the merge conflicts and then I can merge it?

abarrak commented 7 years ago

Hey Franzé ,, I've just added the READMED entry and resolved the conflict. Thanks 😃

abarrak commented 7 years ago

Can't reopen the PR to refresh with changes. 😄

franzejr commented 7 years ago

I also cannot re-open this. Can you send this again?

abarrak commented 7 years ago

Alright, new PR #71