Clean up unused method for `rake doc`.
Merge pull request #10568 from siong1987/minor-refactoring

Clean up unused method for `rake doc`.