refactor. Rename Method class to ResourceMethod.