3 ms·
When it comes to showing off with Ruby, I think that only occurs in two cases: creating unnecessary DSLs (cough Rspec) when plain Ruby was already adequate, and
by blunte 6y ago
When it comes to showing off with Ruby, I think that only occurs in two cases: creating unnecessary DSLs (cough Rspec) when plain Ruby was already adequate, and doing as many chained collection operations in one line as possible.
The former adds a layer of abstraction which is often unnecessary, and the latter can go from succinct to slightly-too-clever to fully obfuscated.
As others have mentioned, Rubocop can help keep some uniformity (although some of the default rules suck, imo). And beyond that, the company just has to have people who agree to be decent. It will happen that developers of different skill levels will write more or less readable code depending on the perspective of the viewer, but that's true in all languages. You _could_ write Ruby code like you would write Basic.