best-ruby icon indicating copy to clipboard operation
best-ruby copied to clipboard

Ruby Tricks, Idiomatic Ruby, Refactoring and Best Practices

Results 8 best-ruby issues
Sort by recently updated
recently updated
newest added

Typo found have been updated

The `if` is actually an expression in the Ruby language. So I would like to correct the statement. ref: https://docs.ruby-lang.org/en/master/syntax/control_expressions_rdoc.html

We should add more refactoring techniques.

enhancement
help wanted

As started [here](https://github.com/franzejr/ruby-tricks/issues/8). We should probably have categories for a bunch of tricks. We may start using some categories, such as: https://youtu.be/aBgnlBoIkVM?t=2m29s

enhancement
help wanted

Probably add a description in the file.

enhancement
help wanted

So far, we just have one best practice for pure Ruby. Looking forward to see more best practices.

enhancement
help wanted

In "Idiomatic Ruby / Combine..." the first statement is extraneous. ``` hash = {} # not needed, even misleading values.inject({}) do |hash, value| hash.merge(value => value ** 2) end ```...

The chapter on combining objects suggests that reduce and inject are different methods for different tasks.

question