I'm sorry, I wasn't clear. You should write the statement like

    params << " /ns=#{@namespace}" if @namespace

`unless <nil?>` is equivalent to `if <value>`