Fix code-style etc.

I’ve fixed most of [Ruby code-style](https://github.com/bbatsov/ruby-style-guide) violations to improve the code quality and readability.