orffen/swn-rb

Code isn't confident

Closed this issue · 3 comments

Fix code per guidelines in Confident Ruby

This has been partially done in commit 8a2f075; the json readers have been made to explicitly use to_s, to_i etc. as appropriate to ensure the right exception is thrown at the right place.

Made an error here; using to_i instead of to_int explicitly forces the input instead of just checking if the input is valid and throwing an exception if it isn't.

More fixes in commit 48d27aa, and I think that's the extent of them. Closing for now...