I’ve become frustrated with Ruby’s syntax for hashes.
1 | hash = {:foo => 'bar'} # not a fan |
Here’s a (non-recommended) way to make it look better by extending the Hash class directly:
1 | class Hash |
This allows the following syntax:
1 | hash = {foo: 'bar'} |