You mean so? What happens in this case when @params[s][parameter] does not exists?
    def GetParameterType(parameter)
        @params.each_key { |s|
           if  @params[s][parameter] && @params[s][k].has_key?("type")
                   return @params[s][parameter]["type"]
           end
        }
        return "string"
    end