This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#gem install net-ping | |
#run script as root | |
#sudo ruby ping_tool.rb 8.8.8.8 | |
require 'net/ping' | |
module Enumerable | |
def sum | |
self.inject(0){|accum, i| accum + i } |