Ruby style guide

This pull request updated the code to follow Ruby style guide as per [https://github.com/bbatsov/ruby-style-guide](https://github.com/bbatsov/ruby-style-guide). Mainly the naming convention.

Not tested obviously.