That article raised a frown with me. It presents some Java code, then shows the Ruby version, which ends up being much more concise. But the Java code is needlessly verbose. Here's how i'd arrange it:
Apart from the cast, which you need because Java has static types and Ruby doesn't, it's the same length. It's basically the same code, token for token.
Actually, the logical structure of the final line is a bit obscure to me; i'd write it:
https://netguru.co/blog/posts/brace-no-more-going-from-java-...