diff options
author | Christoph Helma <helma@in-silico.de> | 2010-03-10 19:17:46 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-03-10 19:17:46 +0100 |
commit | e1cb8e39ca0331ea2db7e633c3bc708aa691b0b3 (patch) | |
tree | 7cc0efea1b83c1455b375ac57d800f385d284237 /lib/task.rb | |
parent | 711234e3f7926231550e9f05cf35921b54056a06 (diff) |
owl-dl (temporarily) removed, switched to YAML representation
Diffstat (limited to 'lib/task.rb')
-rw-r--r-- | lib/task.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/task.rb b/lib/task.rb index a6a54d5..6a80d1a 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -7,16 +7,15 @@ module OpenTox attr_accessor :uri def initialize(uri) - #super() - @uri = uri + @uri = uri.chomp end def self.create #uri = RestClient.post @@config[:services]["opentox-task"], {} resource = RestClient::Resource.new(@@config[:services]["opentox-task"], :user => @@users[:users].keys[0], :password => @@users[:users].values[0]) #uri = resource.post(nil) - uri = resource.post({}) - Task.new(uri) + uri = resource.post({}).chomp + Task.new(uri.chomp) end def self.find(uri) @@ -28,7 +27,7 @@ module OpenTox end def self.all - task_uris = RestClient.get(@@config[:services]["opentox-task"]).split(/\n/) + task_uris = RestClient.get(@@config[:services]["opentox-task"]).chomp.split(/\n/) task_uris.collect{|uri| Task.new(uri)} end |