Anybody knows a converter which takes a list of ruby source files and reliably replaces all old style (hash-rocket) hashes to new style (ruby 1.9) hash syntax? :)
Rubocop is a static code analyzer that evaluates your code against many of the recommendations of the Ruby Style Guide. It has an --auto-correct
option that can automatically change your code to what is recommended. One of those auto-correct options is for hash syntax.
Example:
rubocop --only HashSyntax --auto-correct
will only correct your hashes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With