Skip to content

Instantly share code, notes, and snippets.

@bezelga
Created September 3, 2014 15:27
Show Gist options
  • Save bezelga/93ce9788cf9721464ed8 to your computer and use it in GitHub Desktop.
Save bezelga/93ce9788cf9721464ed8 to your computer and use it in GitHub Desktop.
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