README.rdoc in net-ssh-simple-1.0.0 vs README.rdoc in net-ssh-simple-1.0.1

- old
+ new

@@ -17,20 +17,24 @@ == Examples === Block Syntax (synchronous) + require 'net/ssh/simple' + Net::SSH::Simple.sync do r = ssh 'example1.com', 'echo "Hello World."' puts r.stdout #=> "Hello World." scp_ul 'example2.com', '/tmp/local_foo', '/tmp/remote_bar' scp_dl 'example3.com', '/tmp/remote_foo', '/tmp/local_bar' end === Block Syntax (asynchronous) + require 'net/ssh/simple' + a = Net::SSH::Simple.async do ssh 'example1.com', 'echo "Hello World."' scp_ul 'example2.com', '/tmp/local_foo', '/tmp/remote_bar' scp_dl 'example3.com', '/tmp/remote_foo', '/tmp/local_bar' end @@ -41,9 +45,12 @@ end a.value # Wait for thread A to finish and capture result b.value # Wait for thread B to finish and capture result === Using an instance + + require 'net/ssh/simple' + s = Net::SSH::Simple.new s.ssh 'example1.com', 'echo "Hello World."' s.scp_ul 'example2.com', '/tmp/local_foo', '/tmp/remote_bar' s.scp_dl 'example3.com', '/tmp/remote_foo', '/tmp/local_bar' s.close