diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-03-15 13:13:44 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-03-15 13:13:44 +0100 |
commit | 585a0185af082bc3999375bfcd78677f4dc25059 (patch) | |
tree | 74d891d3dca895d762598ca1f79ef9ab767b481b /lib/task.rb | |
parent | e7f1ecb35d0522890a31b9ba44ebf10b05da80a8 (diff) |
metadata reload fixed
Diffstat (limited to 'lib/task.rb')
-rw-r--r-- | lib/task.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/task.rb b/lib/task.rb index 2f79cf1..7452012 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -97,12 +97,12 @@ module OpenTox code >= 400 and code != 503 end - def method_missing(method,*args) - method = method.to_s - response = self.[](RDF::OT[method]) - response = self.[](RDF::OT1[method]) if response.empty? # API 1.1 compatibility - internal_server_error "Unknown #{self.class} method #{method} for #{@uri}" if response.is_a? Array and response.empty? - return response.to_s + [:hasStatus, :resultURI].each do |method| + define_method method do + response = self.[](RDF::OT[method]) + response = self.[](RDF::OT1[method]) unless response # API 1.1 compatibility + response + end end #TODO: subtasks |