diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-07-12 16:38:03 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-07-12 16:38:03 +0200 |
commit | bf6834445feb6f93f0a20359462dbd1e7e89f4b8 (patch) | |
tree | 2f331f445d8390f7f3309e1689587ae3024c60f4 /lib/compound.rb | |
parent | d8e72c6ff7ce2b147b6a11d233b80bbc8f1760d9 (diff) |
all opentox-client tests pass
Diffstat (limited to 'lib/compound.rb')
-rw-r--r-- | lib/compound.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/compound.rb b/lib/compound.rb index ce0fdbf..5992ee3 100644 --- a/lib/compound.rb +++ b/lib/compound.rb @@ -40,25 +40,25 @@ module OpenTox # Get InChI # @return [String] InChI string def to_inchi - get(:accept => 'chemical/x-inchi').to_s.chomp if @uri + RestClientWrapper.get(@uri,{},{:accept => 'chemical/x-inchi'}).chomp end # Get (canonical) smiles # @return [String] Smiles string def to_smiles - get(:accept => 'chemical/x-daylight-smiles').chomp + RestClientWrapper.get(@uri,{},{:accept => 'chemical/x-daylight-smiles'}).chomp end # Get sdf # @return [String] SDF string def to_sdf - get(:accept => 'chemical/x-mdl-sdfile').chomp + RestClientWrapper.get(@uri,{},{:accept => 'chemical/x-mdl-sdfile'}).chomp end # Get gif image # @return [image/gif] Image data def to_gif - get("#{CACTUS_URI}#{to_inchi}/image") + RestClientWrapper.get("#{CACTUS_URI}#{to_inchi}/image") end # Get png image @@ -66,7 +66,7 @@ module OpenTox # image = compound.to_png # @return [image/png] Image data def to_png - get(File.join @uri, "image") + RestClientWrapper.get(File.join @uri, "image") end # Get URI of compound image @@ -81,7 +81,7 @@ module OpenTox # @return [String] Compound names def to_names begin - get("#{CACTUS_URI}#{to_inchi}/names").split("\n") + RestClientWrapper.get("#{CACTUS_URI}#{to_inchi}/names").split("\n") rescue "not available" end |