standardize ruby code

by rubocop (https://github.com/bbatsov/rubocop)