Class: Agris::ProcessMessageResponse
- Inherits:
-
Object
- Object
- Agris::ProcessMessageResponse
- Defined in:
- lib/agris/process_message_response.rb
Defined Under Namespace
Classes: ErrorInfo
Instance Attribute Summary collapse
-
#ag_error_str_p ⇒ Object
Returns the value of attribute ag_error_str_p.
-
#ag_output_obj_p ⇒ Object
Returns the value of attribute ag_output_obj_p.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #error_hash ⇒ Object
- #error_info ⇒ Object
-
#initialize(result, ag_output_obj_p, ag_error_str_p) ⇒ ProcessMessageResponse
constructor
A new instance of ProcessMessageResponse.
- #output_hash ⇒ Object
Constructor Details
#initialize(result, ag_output_obj_p, ag_error_str_p) ⇒ ProcessMessageResponse
Returns a new instance of ProcessMessageResponse.
6 7 8 9 10 |
# File 'lib/agris/process_message_response.rb', line 6 def initialize(result, ag_output_obj_p, ag_error_str_p) @result = result @ag_output_obj_p = ag_output_obj_p @ag_error_str_p = ag_error_str_p end |
Instance Attribute Details
#ag_error_str_p ⇒ Object
Returns the value of attribute ag_error_str_p.
4 5 6 |
# File 'lib/agris/process_message_response.rb', line 4 def ag_error_str_p @ag_error_str_p end |
#ag_output_obj_p ⇒ Object
Returns the value of attribute ag_output_obj_p.
4 5 6 |
# File 'lib/agris/process_message_response.rb', line 4 def ag_output_obj_p @ag_output_obj_p end |
#result ⇒ Object
Returns the value of attribute result.
4 5 6 |
# File 'lib/agris/process_message_response.rb', line 4 def result @result end |
Instance Method Details
#error? ⇒ Boolean
12 13 14 |
# File 'lib/agris/process_message_response.rb', line 12 def error? !ag_error_str_p.to_s.strip.empty? end |
#error_hash ⇒ Object
20 21 22 |
# File 'lib/agris/process_message_response.rb', line 20 def error_hash @error_hash ||= error? ? Hash.from_xml(ag_error_str_p) : {} end |