updated ruby version
rm trailing whitespaces
rename Enumerable#inject to Enumerable#reduce
fixe code styles - rubocop