Fix access specifiers with private_class_methods instead of removing dir...

...ectly

Referencing old pull request discourse/discourse#2669 that merged removing of private specifier for class methods.