From 1985adc474962f590c5e7331e570fde3dfa3dc5b Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 13 Aug 2009 11:03:59 +0200 Subject: gemspec and rdoc documentation added --- rdoc/classes/OpenTox/Feature.html | 217 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 rdoc/classes/OpenTox/Feature.html (limited to 'rdoc/classes/OpenTox/Feature.html') diff --git a/rdoc/classes/OpenTox/Feature.html b/rdoc/classes/OpenTox/Feature.html new file mode 100644 index 0000000..5e53a12 --- /dev/null +++ b/rdoc/classes/OpenTox/Feature.html @@ -0,0 +1,217 @@ + + + + + + Class: OpenTox::Feature + + + + + + + + + + +
+ + + + + + + + + + + + + + +
ClassOpenTox::Feature
In: + + lib/opentox-ruby-api-wrapper.rb + +
+
Parent: + + OpenTox + +
+
+ + +
+ + + +
+ + + +
+ +
+

Methods

+ +
+ name   + new   + value   +
+
+ +
+ + + + +
+ + + + + + + + + +
+

Public Class methods

+ +
+ + + + +
+

+Initialize with :uri => uri, or :name => name, :values => +hash_of_property_names_and_values +

+

[Source]

+
+
+# File lib/opentox-ruby-api-wrapper.rb, line 52
+                def initialize(params)
+                        if params[:uri]
+                                @uri = params[:uri].to_s
+                        else
+                                @uri = ENV['OPENTOX_FEATURES'] + uri_escape(params[:name]) 
+                                params[:values].each do |k,v|
+                                        @uri += '/' + k.to_s + '/' + v.to_s
+                                end
+                        end
+                end
+
+
+
+
+ +

Public Instance methods

+ +
+ + + + +
+

+Get the name of the feature +

+

[Source]

+
+
+# File lib/opentox-ruby-api-wrapper.rb, line 69
+                def name
+                        RestClient.get @uri + '/name'
+                end
+
+
+
+
+ +
+ + + + +
+

+Get the value of a property +

+

[Source]

+
+
+# File lib/opentox-ruby-api-wrapper.rb, line 64
+                def value(property)
+                        RestClient.get @uri + '/' + property
+                end
+
+
+
+
+ + +
+ + +
+ + +
+

[Validate]

+
+ + + \ No newline at end of file -- cgit v1.2.3