lib/wod/commands/devices.rb in wod-0.0.3 vs lib/wod/commands/devices.rb in wod-0.0.4

- old
+ new

@@ -6,10 +6,11 @@ names = page.search("td.name span").map(&:text) udids = page.search("td.id").map(&:text) devices_left = page.search(".devicesannounce strong").first.text - devices = names.map.with_index{|name, i| {:name => name, :udid => udids[i] } } + devices = [] + names.each_with_index{|name, i| devices << {:name => name, :udid => udids[i] } } display_formatted devices, [:name, :udid] puts puts "#{devices.size} devices registered. #{devices_left}" end \ No newline at end of file