def query(*args) h = {} t = @manager.get(args) h[t.varbind_list[0].name.to_s.sub!(/\.\d+$/, '')] = t.varbind_list[0].value.to_s response = @manager.get_next(args) response.each_varbind do |vb| h[vb.name.to_s.sub!(/\.\d+$/, '')] = vb.value.to_s end @results = h end def query(*args) h = {} @manager.walk(args) do |row| ary = [] row.each do |vb| key = vb.name.to_s.sub!(/\.\d+$/, '') unless h.has_key?(key) h[key] = [] end h[key].push(vb.value.to_s) end end @results = h end