def objectify(result)
      if result.is_a?(Hash)
        ObjectifiedHash.new(result)
      elsif result.is_a?(Array)
        result.map { |e| ObjectifiedHash.new(e) }
      elsif result.nil?
        nil
      else
        fail Error::Parsing, "Couldn't parse a response body"
      end
    end
def objectify(result)
      if result.is_a?(Hash)
        ObjectifiedHash.new(result)
      elsif result.is_a?(Array)
        result.map { |e| ObjectifiedHash.new(e) }
      elsif result.nil?
        nil
      else
        fail Error::Parsing, "Couldn't parse a response body"
      end
    end
Turn a hash into an object for easy accessibility.

 @note This method will objectify nested hashes/arrays.

 @param  [Hash, Array] result An array or hash of results to turn into
   an object
 @return [Rundeck::ObjectifiedHash] if +result+ was a hash
 @return [Rundeck::ObjectifiedHash] if +result+ was an array
 @raise  [Array<Rundeck::Error::Parsing>] Error objectifying array or hash