From bf6834445feb6f93f0a20359462dbd1e7e89f4b8 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 12 Jul 2012 16:38:03 +0200 Subject: all opentox-client tests pass --- lib/compound.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/compound.rb') 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 -- cgit v1.2.3