Created
April 30, 2017 11:56
-
-
Save marcelolebre/9fcbc4c64959bc4eeeff34b20c57d174 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppHandler(object): | |
@classmethod | |
def create(cls, name, description): | |
return CreateAppService(name, description).call() | |
@classmethod | |
def update(cls, app_id, name, description): | |
app = AppFinder.get_from_id(app_id) | |
return UpdateAppService(app, name, description).call() | |
@classmethod | |
def delete(cls, app_id): | |
app = AppFinder.get_from_id(app_id) | |
return DeleteAppService(app).call() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any specific reason to use @classmethod here? Can we use @staticmethod also for these methods?