lib/mantisrb/session.rb
def unwrap_response(response_hash, method_called)
      method_called += "_response"
      response = response_hash.body[method_called.to_sym][:return]
      # TODO: need to find out which types have a nested :item {} hash in them
      if response.class == Hash && response[:item]
        return remove_xsi_type(response[:item])
      elsif response.class == Hash && response[:"@xsi:type"]
        return remove_xsi_type(response)
      end
      return response
    end
# Tease out the actual SOAP response from the envelope and crud wrapping
# each SOAP call from Mantis.
# @param [Hash] response_hash The response hash that you likely received
# from {#response}
# @return [Hash] the response from it trimed out.
Tease out the actual SOAP response from the envelope and crud wrapping
each SOAP call from Mantis.
Tease out the actual SOAP response from the envelope and crud wrapping each SOAP call from Mantis .
def unwrap_response(response_hash, method_called)
      method_called += "_response"
      response = response_hash.body[method_called.to_sym][:return]
      if response.class == Hash && response[:item]
        return remove_xsi_type(response[:item])
      elsif response.class == Hash && response[:"@xsi:type"]
        return remove_xsi_type(response)
      end
      return response
    end
def unwrap_response ( response_hash , method_called ) method_called += "_response" response = response_hash . body [ method_called . to_sym ] [ :return ] if response . class == Hash && response [ :item ] return remove_xsi_type ( response [ :item ] ) elsif response . class == Hash && response [ :" @xsi:type " ] return remove_xsi_type ( response ) end return response end
Tease out the actual SOAP response from the envelope and crud wrapping
each SOAP call from Mantis.
Tease out the actual SOAP response from the envelope and crud wrapping each SOAP call from Mantis .
# TODO: need to find out which types have a nested :item {} hash in them
the response from it trimed out.
the response from it trimed out .
Hash
response_hash
method_called
response_hash The response hash that you likely received from {#response}
response_hash The response hash that you likely received from { #response }