summaryrefslogtreecommitdiff
path: root/lib/task.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/task.rb')
-rw-r--r--lib/task.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/task.rb b/lib/task.rb
index 27dc1c2..0ee3a11 100644
--- a/lib/task.rb
+++ b/lib/task.rb
@@ -84,6 +84,16 @@ module OpenTox
task
end
+ # Find a task for querying, status changes
+ # @param [String] uri Task URI
+ # @return [OpenTox::Task] Task object
+ def self.exist?(uri)
+ begin
+ return find(uri)
+ rescue
+ end
+ end
+
# Get a list of all tasks
# @param [optional, String] uri URI of task service
# @return [text/uri-list] Task URIs