[Minor Refactor] Unify RepoType similar methods
What does this MR do and why?
This is just a minor refactor MR.
Use define_method
to unify some similar methods in RepoType
.
Extracted array SUPPORTED_NAMES
is more readable.
Use comments to make code search easier:
# Defines instance methods:
# - project?
# - wiki?
# - snippet?
# - design?
cc JiHu EM @prajnamas
Edited by Baodong