class Agris::ProcessMessageResponse

Attributes

ag_error_str_p[RW]
ag_output_obj_p[RW]
result[RW]

Public Class Methods

new(result, ag_output_obj_p, ag_error_str_p) click to toggle source
# 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

Public Instance Methods

error?() click to toggle source
# File lib/agris/process_message_response.rb, line 12
def error?
  !ag_error_str_p.to_s.strip.empty?
end
error_hash() click to toggle source
# File lib/agris/process_message_response.rb, line 20
def error_hash
  @error_hash ||= error? ? Hash.from_xml(ag_error_str_p) : {}
end
error_info() click to toggle source
# File lib/agris/process_message_response.rb, line 16
def error_info
  @error_info ||= error? ? ErrorInfo.new(error_hash) : nil
end
output_hash() click to toggle source
# File lib/agris/process_message_response.rb, line 24
def output_hash
  @output_hash ||= Hash.from_xml(ag_output_obj_p)
end