We have all been there, we issue a Pull Request(PR) that we feel is super tight and awesome. It gets stamped "Approved", but there is a catch. Our ...
For further actions, you may consider blocking this person and/or reporting abuse
One small optimization I like is when chaining methods:
can be shortened to:
100% Thanks for pointing that out! I copied it from the other tutorial without even thinking that I should optimize it. Good call.
So I was mentoring the ExamPro interns a few days ago with an introduction on Ruby and I was showing how malleable Ruby is and we came up with this meme.
The last expression would give a different result if x were to be false instead on nil. Beware.
This is why I didn't originally include it since someone such as yourself would have spotted this. ha
πThat's fabulous!
In retrospect, the third should have been
Beware. This 2 lines do not do the same:
Example:
Might I suggest you relabel the "Inline Booleans" section to "Conditionals Can Be Used As Modifiers", as "modifier syntax" is what that feature of the language is actually called.
Would make it easier for those who want to look up additional information on that.
Oh, thanks, I will add that!
Now I want to go back to all my old code and refactor everything that says
x = a if x.nil?
intox ||= a
That's so awesome.Really cool for beginning Rubyists. I use all of these daily (Thanks Rubocop!) except for Safety Navigator which I'll hopefully start using more now.
When I met Guard Clauses fell in love and now I can't stop looking for ways to use them and stop doing:
This may be a month old, but I still use this cheat sheet nearly daily!
YAY!!! I can't tell you how happy that makes me!!!! β€οΈοΈ
I finally just threw it on my bookmark bar instead of relying on browser history which made me realize I should throw up a comment ^_^
You've done it again! This is awesome.