Class: OpenTox::LazarPrediction
- Inherits:
-
OpenTox
- Object
- OpenTox
- OpenTox::LazarPrediction
show all
- Defined in:
- lib/opentox-ruby-api-wrapper.rb
Instance Attribute Summary
Attributes inherited from OpenTox
#uri
Instance Method Summary
collapse
Methods inherited from OpenTox
#destroy, #finished?, #name, #uri_escape
Constructor Details
Returns a new instance of LazarPrediction.
172
173
174
175
176
|
# File 'lib/opentox-ruby-api-wrapper.rb', line 172
def initialize(params)
if params[:uri]
@uri = params[:uri]
end
end
|
Instance Method Details
#classification ⇒ Object
178
179
180
|
# File 'lib/opentox-ruby-api-wrapper.rb', line 178
def classification
YAML.load(RestClient.get @uri)[:classification]
end
|
#confidence ⇒ Object
182
183
184
|
# File 'lib/opentox-ruby-api-wrapper.rb', line 182
def confidence
YAML.load(RestClient.get @uri)[:confidence]
end
|
#features ⇒ Object
190
191
192
|
# File 'lib/opentox-ruby-api-wrapper.rb', line 190
def features
RestClient.get @uri + '/features'
end
|
#neighbors ⇒ Object
186
187
188
|
# File 'lib/opentox-ruby-api-wrapper.rb', line 186
def neighbors
RestClient.get @uri + '/neighbors'
end
|