diff options
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/model.rb b/lib/model.rb index c50a458..0fa3be6 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -11,6 +11,14 @@ module OpenTox super(params[:uri]) end + def self.find(name) + RestClient.get File.join(@@config[:services]["opentox-lazar"], 'model', URI.encode(params[:name])) + end + + def self.find_all + RestClient.get File.join(@@config[:services]["opentox-lazar"], 'models')#.split("\n") + end + # Predict a compound def predict(compound) LazarPrediction.new(:uri => RestClient.post(@uri, :compound_uri => compound.uri)) |