lib/wmap/host_tracker.rb
# Count numbers of entries in the local host repository
Count numbers of entries in the local host repository
Count numbers of entries in the local host repository
def count
		puts "Counting number of entries in the local host repository ..."
		cnt=0
		@known_hosts.keys.map do |key|
			unless is_ip?(key)
				cnt=cnt+1
			end
		end
		puts "Current number of entries: #{cnt}"
		return cnt
	rescue => ee
		puts "Exception on method #{__method__}: #{ee}"
	end
def count puts "Counting number of entries in the local host repository ..." cnt = 0 @known_hosts . keys . map do | key | unless is_ip? ( key ) cnt = cnt + 1 end end puts "Current number of entries: #{cnt}" return cnt rescue => ee puts "Exception on method #{__method__}: #{ee}" end
Count numbers of entries in the local host repository
Count numbers of entries in the local host repository