bug fixed
add rubocop configuration
refactoring by rubocop