diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-11-19 16:53:21 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-11-19 16:53:21 +0100 |
commit | f8552611c2dbe25d76474f51e4e895bf9c2b5c5e (patch) | |
tree | da145cd1d69adc4cdb8d299f0cea2e0810b88eaf /lib/feature.rb | |
parent | 91c95f8dc8f60a8f0029b970ef881eecee28401b (diff) |
lazar predictions for toxcreate working
Diffstat (limited to 'lib/feature.rb')
-rw-r--r-- | lib/feature.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index 13d97a2..9e28077 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -1,5 +1,15 @@ module OpenTox class Feature include OpenTox + + def self.find(uri) + feature = Feature.new uri + if (CONFIG[:yaml_hosts].include?(URI.parse(uri).host)) + feature.add_metadata YAML.load(RestClientWrapper.get(uri,:accept => "application/x-yaml")) + else + feature.add_metadata Parser::Owl::Dataset.new(uri).load_metadata + end + feature + end end end |