Created
September 3, 2014 15:27
-
-
Save bezelga/93ce9788cf9721464ed8 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
module Tod | |
module UseCases | |
class AddTask | |
def self.add(title) | |
task = Entities::Task.new(title: title) | |
if task.valid? | |
Tod.repo.persist(task) | |
else | |
false | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment