Clean the code according to the https://github.com/bbatsov/ruby-style-guide and rubocop

Signed-off-by: Yury Tsarev <ytsarev@suse.com>