tagid(tag)
Instance Public methods
def #set_spans(*pairs)
if pairs[0].kind_of?(Array) # [idx, val], [idx, val], ... args = [] pairs.each{|idx, val| args << tagid(idx) if val.kind_of?(Array) args << val.join(',') else args << val end } tk_send('spans', *args) else # idx, val, idx, val, ... args = [] 0.step(pairs.size-1, 2){|i| args << tagid(pairs[i]) val = pairs[i+1] if val.kind_of?(Array) args << val.join(',') else args << val end } tk_send('spans', *args) end self
end
Please login to continue.