Class: ZenRuby::Result
- Inherits:
-
Struct
- Object
- Struct
- ZenRuby::Result
- Defined in:
- lib/zen-engine-ruby.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#error ⇒ Object
Returns the value of attribute error.
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#result ⇒ Object
Returns the value of attribute result.
Class Method Summary collapse
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details
269 270 271 |
# File 'lib/zen-engine-ruby.rb', line 269 def details @details end |
#error ⇒ Object
Returns the value of attribute error
269 270 271 |
# File 'lib/zen-engine-ruby.rb', line 269 def error @error end |
#error_code ⇒ Object
Returns the value of attribute error_code
269 270 271 |
# File 'lib/zen-engine-ruby.rb', line 269 def error_code @error_code end |
#result ⇒ Object
Returns the value of attribute result
269 270 271 |
# File 'lib/zen-engine-ruby.rb', line 269 def result @result end |
Class Method Details
.from_raw_result(raw_result) ⇒ Object
270 271 272 273 274 275 276 277 |
# File 'lib/zen-engine-ruby.rb', line 270 def self.from_raw_result(raw_result) if raw_result[:error] == 0 json_string = raw_result[:result].read_string ZenRuby::Result.new(JSON.parse(json_string), false, 0, nil) else ZenRuby::Result.new(nil, true, raw_result[:error], raw_result[:details].read_string) end end |