Fix code style based on the Ruby Style Guide

https://github.com/bbatsov/ruby-style-guide