fixes #940

fix rubocop bugs
Merge pull request #942 from fshowalter/fix_940

fix useless_access_modifier bug