summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordelano <delano.mandelbaum@gmail.com>2013-02-06 08:04:41 -0800
committerdelano <delano.mandelbaum@gmail.com>2013-02-06 08:04:41 -0800
commit345d20dd3f993b84bbdae265d4a156a7d87fbf28 (patch)
treeac7aa1eb480b727ed07f0d176130d0ad806abb27
parent73d75b2c3a5465392fd6210dbb844c49dd043cdc (diff)
downloadnet-ssh-multi-345d20dd3f993b84bbdae265d4a156a7d87fbf28.tar.gz
Updated docs
-rw-r--r--.DS_Storebin0 -> 6148 bytes
-rw-r--r--classes/Net.html49
-rw-r--r--classes/Net/SSH.html49
-rw-r--r--classes/Net/SSH/Multi.html127
-rw-r--r--classes/Net/SSH/Multi/Channel.html480
-rw-r--r--classes/Net/SSH/Multi/ChannelProxy.html115
-rw-r--r--classes/Net/SSH/Multi/DynamicServer.html192
-rw-r--r--classes/Net/SSH/Multi/PendingConnection.html236
-rw-r--r--classes/Net/SSH/Multi/Server.html355
-rw-r--r--classes/Net/SSH/Multi/ServerList.html164
-rw-r--r--classes/Net/SSH/Multi/Session.html619
-rw-r--r--classes/Net/SSH/Multi/SessionActions.html257
-rw-r--r--classes/Net/SSH/Multi/Subsession.html102
-rw-r--r--classes/Net/SSH/Multi/Version.html50
-rw-r--r--created.rid16
-rw-r--r--css/style.css328
-rw-r--r--files/CHANGELOG_rdoc.html86
-rw-r--r--files/CHANGES_txt.html85
-rw-r--r--files/README_rdoc.html218
-rw-r--r--files/lib/net/ssh/multi/channel_proxy_rb.html13
-rw-r--r--files/lib/net/ssh/multi/channel_rb.html13
-rw-r--r--files/lib/net/ssh/multi/dynamic_server_rb.html13
-rw-r--r--files/lib/net/ssh/multi/pending_connection_rb.html13
-rw-r--r--files/lib/net/ssh/multi/server_list_rb.html13
-rw-r--r--files/lib/net/ssh/multi/server_rb.html13
-rw-r--r--files/lib/net/ssh/multi/session_actions_rb.html13
-rw-r--r--files/lib/net/ssh/multi/session_rb.html13
-rw-r--r--files/lib/net/ssh/multi/subsession_rb.html13
-rw-r--r--files/lib/net/ssh/multi/version_rb.html13
-rw-r--r--files/lib/net/ssh/multi_rb.html13
-rw-r--r--fr_class_index.html36
-rw-r--r--fr_file_index.html34
-rw-r--r--fr_method_index.html370
-rw-r--r--index.html4
-rw-r--r--pkg/net-ssh-multi-1.1.0.gembin0 -> 32256 bytes
-rw-r--r--pkg/net-ssh-multi-1.1.gembin0 -> 27136 bytes
-rw-r--r--pkg/net-ssh-multi-1.1.tgzbin0 -> 24525 bytes
-rw-r--r--pkg/net-ssh-multi-1.1/CHANGELOG.rdoc25
-rw-r--r--pkg/net-ssh-multi-1.1/README.rdoc87
-rw-r--r--pkg/net-ssh-multi-1.1/Rakefile85
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi.rb71
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/channel.rb230
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/channel_proxy.rb50
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/dynamic_server.rb71
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/pending_connection.rb112
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/server.rb231
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/server_list.rb80
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb551
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb153
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/subsession.rb48
-rw-r--r--pkg/net-ssh-multi-1.1/lib/net/ssh/multi/version.rb21
-rw-r--r--pkg/net-ssh-multi-1.1/test/channel_test.rb152
-rw-r--r--pkg/net-ssh-multi-1.1/test/common.rb2
-rw-r--r--pkg/net-ssh-multi-1.1/test/multi_test.rb20
-rw-r--r--pkg/net-ssh-multi-1.1/test/server_test.rb256
-rw-r--r--pkg/net-ssh-multi-1.1/test/session_actions_test.rb128
-rw-r--r--pkg/net-ssh-multi-1.1/test/session_test.rb201
-rw-r--r--pkg/net-ssh-multi-1.1/test/test_all.rb5
58 files changed, 4854 insertions, 1840 deletions
diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..eecaed8
--- /dev/null
+++ b/.DS_Store
Binary files differ
diff --git a/classes/Net.html b/classes/Net.html
index a4b4cc9..26e3e3f 100644
--- a/classes/Net.html
+++ b/classes/Net.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,62 +26,71 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Module</span>
+ <span class='type'>module</span>
Net
</h1>
<ol class='paths'>
<li>
- <a href="../files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a>
</li>
<li class='other'>
- <a href="../files/lib/net/ssh/multi_rb.html">lib/net/ssh/multi.rb</a>
+ <a target="docwin" href="../files/lib/net/ssh/multi_rb.html">lib/net/ssh/multi.rb</a>
</li>
<li>
<a class='show' href='#' onclick='this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false'>show all</a>
</li>
</ol>
+ <div class='parent'>
+ Parent:
+ <strong><a target="docwin" href="../files/lib/net/ssh/multi_rb.html">multi.rb</a></strong>
+ </div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
+ <div id='context'>
+ </div>
+ <div id='class-list'>
+ <h2>Classes and Modules</h2>
+ <ol>
+ <li><a target="docwin" href="Net/SSH.html">Net::SSH</a></li>
+ </ol>
+ </div>
<div id='section'>
- <div id='class-list'>
- <h2>Classes and Modules</h2>
- Module <a href="Net/SSH.html" class="link">Net::SSH</a><br />
- </div>
</div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH.html b/classes/Net/SSH.html
index 241010c..7955fae 100644
--- a/classes/Net/SSH.html
+++ b/classes/Net/SSH.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,62 +26,71 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Module</span>
+ <span class='type'>module</span>
Net::SSH
</h1>
<ol class='paths'>
<li>
- <a href="../../files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a>
</li>
<li class='other'>
- <a href="../../files/lib/net/ssh/multi_rb.html">lib/net/ssh/multi.rb</a>
+ <a target="docwin" href="../../files/lib/net/ssh/multi_rb.html">lib/net/ssh/multi.rb</a>
</li>
<li>
<a class='show' href='#' onclick='this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false'>show all</a>
</li>
</ol>
+ <div class='parent'>
+ Parent:
+ <strong><a target="docwin" href="../Net.html">Net</a></strong>
+ </div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
+ <div id='context'>
+ </div>
+ <div id='class-list'>
+ <h2>Classes and Modules</h2>
+ <ol>
+ <li><a target="docwin" href="SSH/Multi.html">Net::SSH::Multi</a></li>
+ </ol>
+ </div>
<div id='section'>
- <div id='class-list'>
- <h2>Classes and Modules</h2>
- Module <a href="SSH/Multi.html" class="link">Net::SSH::Multi</a><br />
- </div>
</div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi.html b/classes/Net/SSH/Multi.html
index 2fd28f8..c9ae8ee 100644
--- a/classes/Net/SSH/Multi.html
+++ b/classes/Net/SSH/Multi.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,119 +26,126 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Module</span>
+ <span class='type'>module</span>
Net::SSH::Multi
</h1>
<ol class='paths'>
<li>
- <a href="../../../files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a>
</li>
<li class='other'>
- <a href="../../../files/lib/net/ssh/multi_rb.html">lib/net/ssh/multi.rb</a>
+ <a target="docwin" href="../../../files/lib/net/ssh/multi_rb.html">lib/net/ssh/multi.rb</a>
</li>
<li>
<a class='show' href='#' onclick='this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false'>show all</a>
</li>
</ol>
+ <div class='parent'>
+ Parent:
+ <strong><a target="docwin" href="../SSH.html">SSH</a></strong>
+ </div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- <a href="Multi.html">Net::SSH::Multi</a> is a library for controlling
+
+ <p><a href="Multi.html">Net::SSH::Multi</a> is a library for controlling
multiple <a href="../SSH.html">Net::SSH</a> connections via a single
interface. It exposes an API similar to that of
Net::SSH::Connection::Session and Net::SSH::Connection::Channel, making it
simpler to adapt programs designed for single connections to be used with
- multiple connections.
- </p>
- <p>
- This library is particularly useful for automating repetitive tasks that
+ multiple connections.</p>
+
+ <p>This library is particularly useful for automating repetitive tasks that
must be performed on multiple machines. It executes the commands in
parallel, and allows commands to be executed on subsets of servers (defined
- by groups).
- </p>
- <pre>require 'net/ssh/multi'&#x000A;&#x000A;Net::SSH::Multi.start do |session|&#x000A; # access servers via a gateway&#x000A; session.via 'gateway', 'gateway-user'&#x000A;&#x000A; # define the servers we want to use&#x000A; session.use 'user1@host1'&#x000A; session.use 'user2@host2'&#x000A;&#x000A; # define servers in groups for more granular access&#x000A; session.group :app do&#x000A; session.use 'user@app1'&#x000A; session.use 'user@app2'&#x000A; end&#x000A;&#x000A; # execute commands on all servers&#x000A; session.exec &quot;uptime&quot;&#x000A;&#x000A; # execute commands on a subset of servers&#x000A; session.with(:app).exec &quot;hostname&quot;&#x000A;&#x000A; # run the aggregated event loop&#x000A; session.loop&#x000A;end</pre>
- <p>
- See <a href="Multi/Session.html">Net::SSH::Multi::Session</a> for more
- documentation.
- </p>
+ by groups).</p>
+
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'net/ssh/multi'</span>&#x000A;&#x000A;<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">session</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># access servers via a gateway</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">via</span> <span class="ruby-string">'gateway'</span>, <span class="ruby-string">'gateway-user'</span>&#x000A;&#x000A; <span class="ruby-comment"># define the servers we want to use</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user1@host1'</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user2@host2'</span>&#x000A;&#x000A; <span class="ruby-comment"># define servers in groups for more granular access</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">group</span> :<span class="ruby-identifier">app</span> <span class="ruby-keyword">do</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user@app1'</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user@app2'</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-comment"># execute commands on all servers</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">exec</span> <span class="ruby-string">&quot;uptime&quot;</span>&#x000A;&#x000A; <span class="ruby-comment"># execute commands on a subset of servers</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">with</span>(:<span class="ruby-identifier">app</span>).<span class="ruby-identifier">exec</span> <span class="ruby-string">&quot;hostname&quot;</span>&#x000A;&#x000A; <span class="ruby-comment"># run the aggregated event loop</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">loop</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>See <a href="Multi/Session.html">Net::SSH::Multi::Session</a> for more
+ documentation.</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
+ <ol>
+ <li><a target="docwin" href="#method-c-start">start</a></li>
+ </ol>
+ </div>
+ <div id='context'>
+ </div>
+ <div id='class-list'>
+ <h2>Classes and Modules</h2>
<ol>
- <li><a href="#M000001">start</a></li>
+ <li><a target="docwin" href="Multi/SessionActions.html">Net::SSH::Multi::SessionActions</a></li>
+ <li><a target="docwin" href="Multi/Channel.html">Net::SSH::Multi::Channel</a></li>
+ <li><a target="docwin" href="Multi/ChannelProxy.html">Net::SSH::Multi::ChannelProxy</a></li>
+ <li><a target="docwin" href="Multi/DynamicServer.html">Net::SSH::Multi::DynamicServer</a></li>
+ <li><a target="docwin" href="Multi/PendingConnection.html">Net::SSH::Multi::PendingConnection</a></li>
+ <li><a target="docwin" href="Multi/Server.html">Net::SSH::Multi::Server</a></li>
+ <li><a target="docwin" href="Multi/ServerList.html">Net::SSH::Multi::ServerList</a></li>
+ <li><a target="docwin" href="Multi/Session.html">Net::SSH::Multi::Session</a></li>
+ <li><a target="docwin" href="Multi/Subsession.html">Net::SSH::Multi::Subsession</a></li>
+ <li><a target="docwin" href="Multi/Version.html">Net::SSH::Multi::Version</a></li>
</ol>
</div>
<div id='section'>
- <div id='class-list'>
- <h2>Classes and Modules</h2>
- Module <a href="Multi/SessionActions.html" class="link">Net::SSH::Multi::SessionActions</a><br />
- Class <a href="Multi/Channel.html" class="link">Net::SSH::Multi::Channel</a><br />
- Class <a href="Multi/ChannelProxy.html" class="link">Net::SSH::Multi::ChannelProxy</a><br />
- Class <a href="Multi/DynamicServer.html" class="link">Net::SSH::Multi::DynamicServer</a><br />
- Class <a href="Multi/PendingConnection.html" class="link">Net::SSH::Multi::PendingConnection</a><br />
- Class <a href="Multi/Server.html" class="link">Net::SSH::Multi::Server</a><br />
- Class <a href="Multi/ServerList.html" class="link">Net::SSH::Multi::ServerList</a><br />
- Class <a href="Multi/Session.html" class="link">Net::SSH::Multi::Session</a><br />
- Class <a href="Multi/Subsession.html" class="link">Net::SSH::Multi::Subsession</a><br />
- Class <a href="Multi/Version.html" class="link">Net::SSH::Multi::Version</a><br />
- </div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000001'>
- <a name='M000001'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-start'>
+ <a name='method-c-start'></a>
<div class='synopsis'>
<span class='name'>start</span>
- <span class='arguments'>(options={}) {|session| ...}</span>
+ <span class='arguments'>(options={})</span>
</div>
<div class='description'>
- <p>
- This is a convenience method for instantiating a new <a
+
+ <p>This is a convenience method for instantiating a new <a
href="Multi/Session.html">Net::SSH::Multi::Session</a>. If a block is
given, the session will be yielded to the block automatically closed (see
- <a href="Multi/Session.html#M000074">Net::SSH::Multi::Session#close</a>)
- when the block finishes. Otherwise, the new session will be returned.
- </p>
- <pre>Net::SSH::Multi.start do |session|&#x000A; # ...&#x000A;end&#x000A;&#x000A;session = Net::SSH::Multi.start&#x000A;# ...&#x000A;session.close</pre>
- <p>
- Any options are passed directly to <a
- href="Multi/Session.html#M000066">Net::SSH::Multi::Session.new</a> (q.v.).
- </p>
+ <a
+ href="Multi/Session.html#method-i-close">Net::SSH::Multi::Session#close</a>)
+ when the block finishes. Otherwise, the new session will be returned.</p>
+
+ <pre class="ruby"><span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">session</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span>&#x000A;&#x000A;<span class="ruby-identifier">session</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span>&#x000A;<span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-identifier">session</span>.<span class="ruby-identifier">close</span></pre>
+
+ <p>Any options are passed directly to <a
+ href="Multi/Session.html#method-c-new">Net::SSH::Multi::Session.new</a>
+ (q.v.).</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000001-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-start-source'); return false">
[show source]
</a>
- <pre id='M000001-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi.rb, line 57</span>&#x000A;57: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">options</span>={})&#x000A;58: <span class="ruby-identifier">session</span> = <span class="ruby-constant">Session</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)&#x000A;59: &#x000A;60: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>&#x000A;61: <span class="ruby-keyword kw">begin</span>&#x000A;62: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">session</span>&#x000A;63: <span class="ruby-identifier">session</span>.<span class="ruby-identifier">loop</span>&#x000A;64: <span class="ruby-identifier">session</span>.<span class="ruby-identifier">close</span>&#x000A;65: <span class="ruby-keyword kw">end</span>&#x000A;66: <span class="ruby-keyword kw">else</span>&#x000A;67: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">session</span>&#x000A;68: <span class="ruby-keyword kw">end</span>&#x000A;69: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-start-source'><span class="ruby-comment"># File lib/net/ssh/multi.rb, line 57</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">options</span>={})&#x000A; <span class="ruby-identifier">session</span> = <span class="ruby-constant">Session</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)&#x000A;&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>&#x000A; <span class="ruby-keyword">begin</span>&#x000A; <span class="ruby-keyword">yield</span> <span class="ruby-identifier">session</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">loop</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">close</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-keyword">return</span> <span class="ruby-identifier">session</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -148,7 +155,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/Channel.html b/classes/Net/SSH/Multi/Channel.html
index 779b48c..e535eb3 100644
--- a/classes/Net/SSH/Multi/Channel.html
+++ b/classes/Net/SSH/Multi/Channel.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::Channel [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::Channel</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,65 +26,70 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::Channel
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Object</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- <a href="Channel.html">Net::SSH::Multi::Channel</a> encapsulates a
+
+ <p><a href="Channel.html">Net::SSH::Multi::Channel</a> encapsulates a
collection of Net::SSH::Connection::Channel instances from multiple
different connections. It allows for operations to be performed on all
contained channels, simultaneously, using an interface mostly identical to
- Net::SSH::Connection::Channel itself.
- </p>
- <p>
- You typically obtain a <a href="Channel.html">Net::SSH::Multi::Channel</a>
- instance via Net::SSH::Multi::Session#open_channel or
- Net::SSH::Multi::Session#exec, though there is nothing stopping you from
- instantiating one yourself with a handful of Net::SSH::Connection::Channel
- objects (though they should be associated with connections managed by a <a
+ Net::SSH::Connection::Channel itself.</p>
+
+ <p>You typically obtain a <a href="Channel.html">Net::SSH::Multi::Channel</a>
+ instance via <a
+ href="SessionActions.html#method-i-open_channel">Net::SSH::Multi::SessionActions#open_channel</a>
+ or <a
+ href="SessionActions.html#method-i-exec">Net::SSH::Multi::SessionActions#exec</a>,
+ though there is nothing stopping you from instantiating one yourself with a
+ handful of Net::SSH::Connection::Channel objects (though they should be
+ associated with connections managed by a <a
href="Session.html">Net::SSH::Multi::Session</a> object for consistent
- behavior).
- </p>
- <pre>channel = session.open_channel do |ch|&#x000A; # ...&#x000A;end&#x000A;&#x000A;channel.wait</pre>
+ behavior).</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span> = <span class="ruby-identifier">session</span>.<span class="ruby-identifier">open_channel</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span>&#x000A;&#x000A;<span class="ruby-identifier">channel</span>.<span class="ruby-identifier">wait</span></pre>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
<ol>
- <li><a href="#M000009">new</a></li>
+ <li><a target="docwin" href="#method-c-new">new</a></li>
</ol>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000011">[]</a></li>
- <li><a href="#M000012">[]=</a></li>
- <li><a href="#M000016">active?</a></li>
- <li><a href="#M000018">close</a></li>
- <li><a href="#M000010">each</a></li>
- <li><a href="#M000019">eof!</a></li>
- <li><a href="#M000013">exec</a></li>
- <li><a href="#M000023">on_close</a></li>
- <li><a href="#M000020">on_data</a></li>
- <li><a href="#M000024">on_eof</a></li>
- <li><a href="#M000021">on_extended_data</a></li>
- <li><a href="#M000025">on_open_failed</a></li>
- <li><a href="#M000022">on_process</a></li>
- <li><a href="#M000026">on_request</a></li>
- <li><a href="#M000014">request_pty</a></li>
- <li><a href="#M000015">send_data</a></li>
- <li><a href="#M000017">wait</a></li>
+ <li><a target="docwin" href="#method-i-5B-5D">[]</a></li>
+ <li><a target="docwin" href="#method-i-5B-5D-3D">[]=</a></li>
+ <li><a target="docwin" href="#method-i-active-3F">active?</a></li>
+ <li><a target="docwin" href="#attribute-i-channels">channels</a></li>
+ <li><a target="docwin" href="#method-i-close">close</a></li>
+ <li><a target="docwin" href="#attribute-i-connection">connection</a></li>
+ <li><a target="docwin" href="#method-i-each">each</a></li>
+ <li><a target="docwin" href="#method-i-eof-21">eof!</a></li>
+ <li><a target="docwin" href="#method-i-exec">exec</a></li>
+ <li><a target="docwin" href="#method-i-on_close">on_close</a></li>
+ <li><a target="docwin" href="#method-i-on_data">on_data</a></li>
+ <li><a target="docwin" href="#method-i-on_eof">on_eof</a></li>
+ <li><a target="docwin" href="#method-i-on_extended_data">on_extended_data</a></li>
+ <li><a target="docwin" href="#method-i-on_open_failed">on_open_failed</a></li>
+ <li><a target="docwin" href="#method-i-on_process">on_process</a></li>
+ <li><a target="docwin" href="#method-i-on_request">on_request</a></li>
+ <li><a target="docwin" href="#attribute-i-properties">properties</a></li>
+ <li><a target="docwin" href="#method-i-request_pty">request_pty</a></li>
+ <li><a target="docwin" href="#method-i-send_data">send_data</a></li>
+ <li><a target="docwin" href="#method-i-wait">wait</a></li>
</ol>
</div>
<div id='context'>
@@ -101,427 +106,430 @@
<div class='name-list'>
<table>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>channels</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-channels'>channels</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The collection of Net::SSH::Connection::Channel instances that this
- multi-channel aggregates.
+ <p>The collection of Net::SSH::Connection::Channel instances that this
+ multi-channel aggregates.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>connection</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-connection'>connection</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The <a href="Session.html">Net::SSH::Multi::Session</a> instance that
- controls this channel collection.
+ <p>The <a href="Session.html">Net::SSH::Multi::Session</a> instance that
+ controls this channel collection.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>properties</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-properties'>properties</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- A Hash of custom properties that may be set and queried on this object.
+ <p>A Hash of custom properties that may be set and queried on this object.</p>
</td>
</tr>
</table>
</div>
</div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000009'>
- <a name='M000009'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-new'>
+ <a name='method-c-new'></a>
<div class='synopsis'>
<span class='name'>new</span>
<span class='arguments'>(connection, channels)</span>
</div>
<div class='description'>
- <p>
- Instantiate a new <a href="Channel.html">Net::SSH::Multi::Channel</a>
- instance, controlled by the given <tt>connection</tt> (a <a
+
+ <p>Instantiate a new <a href="Channel.html">Net::SSH::Multi::Channel</a>
+ instance, controlled by the given <code>connection</code> (a <a
href="Session.html">Net::SSH::Multi::Session</a> object) and wrapping the
- given <tt>channels</tt> (Net::SSH::Connection::Channel instances).
- </p>
- <p>
- You will typically never call this directly; rather, you&#8217;ll get your
- multi-channel references via Net::SSH::Multi::Session#open_channel and
- friends.
- </p>
+ given <code>channels</code> (Net::SSH::Connection::Channel instances).</p>
+
+ <p>You will typically never call this directly; rather, you'll get your
+ multi-channel references via <a
+ href="SessionActions.html#method-i-open_channel">Net::SSH::Multi::SessionActions#open_channel</a>
+ and friends.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000009-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-new-source'); return false">
[show source]
</a>
- <pre id='M000009-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 38</span>&#x000A;38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">connection</span>, <span class="ruby-identifier">channels</span>)&#x000A;39: <span class="ruby-ivar">@connection</span> = <span class="ruby-identifier">connection</span>&#x000A;40: <span class="ruby-ivar">@channels</span> = <span class="ruby-identifier">channels</span>&#x000A;41: <span class="ruby-ivar">@properties</span> = {}&#x000A;42: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-new-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 38</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">connection</span>, <span class="ruby-identifier">channels</span>)&#x000A; <span class="ruby-ivar">@connection</span> = <span class="ruby-identifier">connection</span>&#x000A; <span class="ruby-ivar">@channels</span> = <span class="ruby-identifier">channels</span>&#x000A; <span class="ruby-ivar">@properties</span> = {}&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000011'>
- <a name='M000011'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-5B-5D'>
+ <a name='method-i-5B-5D'></a>
<div class='synopsis'>
<span class='name'>[]</span>
<span class='arguments'>(key)</span>
</div>
<div class='description'>
- <p>
- Retrieve the property (see properties) with the given <tt>key</tt>.
- </p>
+
+ <p>Retrieve the property (see <a
+ href="Channel.html#attribute-i-properties">properties</a>) with the given
+ <code>key</code>.</p>
+
<pre>host = channel[:host]</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000011-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-5B-5D-source'); return false">
[show source]
</a>
- <pre id='M000011-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 53</span>&#x000A;53: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)&#x000A;54: <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">key</span>]&#x000A;55: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-5B-5D-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 53</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)&#x000A; <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">key</span>]&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000012'>
- <a name='M000012'> </a>
+ <div class='method public-instance' id='method-method-i-5B-5D-3D'>
+ <a name='method-i-5B-5D-3D'></a>
<div class='synopsis'>
<span class='name'>[]=</span>
<span class='arguments'>(key, value)</span>
</div>
<div class='description'>
- <p>
- Set the property (see properties) with the given <tt>key</tt> to the given
- <tt>value</tt>.
- </p>
+
+ <p>Set the property (see <a
+ href="Channel.html#attribute-i-properties">properties</a>) with the given
+ <code>key</code> to the given <code>value</code>.</p>
+
<pre>channel[:visited] = true</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000012-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-5B-5D-3D-source'); return false">
[show source]
</a>
- <pre id='M000012-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 61</span>&#x000A;61: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)&#x000A;62: <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>&#x000A;63: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-5B-5D-3D-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 61</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)&#x000A; <span class="ruby-ivar">@properties</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000016'>
- <a name='M000016'> </a>
+ <div class='method public-instance' id='method-method-i-active-3F'>
+ <a name='method-i-active-3F'></a>
<div class='synopsis'>
<span class='name'>active?</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns true as long as any of the component channels are active.
- </p>
+
+ <p>Returns true as long as any of the component channels are active.</p>
+
<pre>connection.loop { channel.active? }</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000016-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-active-3F-source'); return false">
[show source]
</a>
- <pre id='M000016-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 112</span>&#x000A;112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">active?</span>&#x000A;113: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">active?</span> }&#x000A;114: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-active-3F-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 112</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">active?</span>&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">active?</span> }&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000018'>
- <a name='M000018'> </a>
+ <div class='method public-instance' id='method-method-i-close'>
+ <a name='method-i-close'></a>
<div class='synopsis'>
<span class='name'>close</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Closes all component channels.
- </p>
+
+ <p>Closes all component channels.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000018-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-close-source'); return false">
[show source]
</a>
- <pre id='M000018-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 127</span>&#x000A;127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>&#x000A;128: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">close</span> }&#x000A;129: <span class="ruby-keyword kw">self</span>&#x000A;130: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-close-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 127</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">close</span>&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">close</span> }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000010'>
- <a name='M000010'> </a>
+ <div class='method public-instance' id='method-method-i-each'>
+ <a name='method-i-each'></a>
<div class='synopsis'>
<span class='name'>each</span>
- <span class='arguments'>() {|channel| ...}</span>
+ <span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Iterate over each component channel object, yielding each in order to the
- associated block.
- </p>
+
+ <p>Iterate over each component channel object, yielding each in order to the
+ associated block.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000010-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-each-source'); return false">
[show source]
</a>
- <pre id='M000010-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 46</span>&#x000A;46: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>&#x000A;47: <span class="ruby-ivar">@channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">channel</span> }&#x000A;48: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-each-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 46</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>&#x000A; <span class="ruby-ivar">@channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">channel</span> }&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000019'>
- <a name='M000019'> </a>
+ <div class='method public-instance' id='method-method-i-eof-21'>
+ <a name='method-i-eof-21'></a>
<div class='synopsis'>
<span class='name'>eof!</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Tells the remote process for each component channel not to expect any
- further data from this end of the channel.
- </p>
+
+ <p>Tells the remote process for each component channel not to expect any
+ further data from this end of the channel.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000019-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-eof-21-source'); return false">
[show source]
</a>
- <pre id='M000019-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 134</span>&#x000A;134: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eof!</span>&#x000A;135: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">eof!</span> }&#x000A;136: <span class="ruby-keyword kw">self</span>&#x000A;137: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-eof-21-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 134</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">eof!</span>&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">eof!</span> }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000013'>
- <a name='M000013'> </a>
+ <div class='method public-instance' id='method-method-i-exec'>
+ <a name='method-i-exec'></a>
<div class='synopsis'>
<span class='name'>exec</span>
- <span class='arguments'>(command, &amp;block)</span>
+ <span class='arguments'>(command, &block)</span>
</div>
<div class='description'>
- <p>
- Perform an <tt>exec</tt> command on all component channels. The block, if
- given, is passed to each component channel, so it will (potentially) be
+
+ <p>Perform an <code>exec</code> command on all component channels. The block,
+ if given, is passed to each component channel, so it will (potentially) be
invoked once for every channel in the collection. The block will receive
two parameters: the specific channel object being operated on, and a
- boolean indicating whether the exec succeeded or not.
- </p>
- <pre>channel.exec &quot;ls -l&quot; do |ch, success|&#x000A; # ...&#x000A;end</pre>
- <p>
- See the documentation in <a href="../../SSH.html">Net::SSH</a> for
+ boolean indicating whether the exec succeeded or not.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">exec</span> <span class="ruby-string">&quot;ls -l&quot;</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">success</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>See the documentation in <a href="../../SSH.html">Net::SSH</a> for
Net::SSH::Connection::Channel#exec for more information on how to work with
- the callback.
- </p>
+ the callback.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000013-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-exec-source'); return false">
[show source]
</a>
- <pre id='M000013-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 77</span>&#x000A;77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exec</span>(<span class="ruby-identifier">command</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;78: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">exec</span>(<span class="ruby-identifier">command</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;79: <span class="ruby-keyword kw">self</span>&#x000A;80: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-exec-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 77</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">exec</span>(<span class="ruby-identifier">command</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">exec</span>(<span class="ruby-identifier">command</span>, &amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000023'>
- <a name='M000023'> </a>
+ <div class='method public-instance' id='method-method-i-on_close'>
+ <a name='method-i-on_close'></a>
<div class='synopsis'>
<span class='name'>on_close</span>
- <span class='arguments'>(&amp;block)</span>
+ <span class='arguments'>(&block)</span>
</div>
<div class='description'>
- <p>
- Registers a callback on all component channels, to be invoked when the
+
+ <p>Registers a callback on all component channels, to be invoked when the
remote server terminates the channel. The callback will be invoked with one
- argument: the specific channel object being closed.
- </p>
- <pre>channel.on_close do |ch|&#x000A; # ...&#x000A;end</pre>
+ argument: the specific channel object being closed.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_close</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000023-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-on_close-source'); return false">
[show source]
</a>
- <pre id='M000023-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 185</span>&#x000A;185: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_close</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;186: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_close</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;187: <span class="ruby-keyword kw">self</span>&#x000A;188: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-on_close-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 185</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_close</span>(&amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_close</span>(&amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000020'>
- <a name='M000020'> </a>
+ <div class='method public-instance' id='method-method-i-on_data'>
+ <a name='method-i-on_data'></a>
<div class='synopsis'>
<span class='name'>on_data</span>
- <span class='arguments'>(&amp;block)</span>
+ <span class='arguments'>(&block)</span>
</div>
<div class='description'>
- <p>
- Registers a callback on all component channels, to be invoked when the
- remote process emits data (usually on its <tt>stdout</tt> stream). The
+
+ <p>Registers a callback on all component channels, to be invoked when the
+ remote process emits data (usually on its <code>stdout</code> stream). The
block will be invoked with two arguments: the specific channel object, and
- the data that was received.
- </p>
- <pre>channel.on_data do |ch, data|&#x000A; puts &quot;got data: #{data}&quot;&#x000A;end</pre>
+ the data that was received.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_data</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;got data: #{data}&quot;</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000020-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-on_data-source'); return false">
[show source]
</a>
- <pre id='M000020-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 147</span>&#x000A;147: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_data</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;148: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_data</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;149: <span class="ruby-keyword kw">self</span>&#x000A;150: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-on_data-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 147</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_data</span>(&amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_data</span>(&amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000024'>
- <a name='M000024'> </a>
+ <div class='method public-instance' id='method-method-i-on_eof'>
+ <a name='method-i-on_eof'></a>
<div class='synopsis'>
<span class='name'>on_eof</span>
- <span class='arguments'>(&amp;block)</span>
+ <span class='arguments'>(&block)</span>
</div>
<div class='description'>
- <p>
- Registers a callback on all component channels, to be invoked when the
+
+ <p>Registers a callback on all component channels, to be invoked when the
remote server has no further data to send. The callback will be invoked
- with one argument: the specific channel object being marked EOF.
- </p>
- <pre>channel.on_eof do |ch|&#x000A; # ...&#x000A;end</pre>
+ with one argument: the specific channel object being marked EOF.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_eof</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000024-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-on_eof-source'); return false">
[show source]
</a>
- <pre id='M000024-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 197</span>&#x000A;197: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_eof</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;198: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_eof</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;199: <span class="ruby-keyword kw">self</span>&#x000A;200: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-on_eof-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 197</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_eof</span>(&amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_eof</span>(&amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000021'>
- <a name='M000021'> </a>
+ <div class='method public-instance' id='method-method-i-on_extended_data'>
+ <a name='method-i-on_extended_data'></a>
<div class='synopsis'>
<span class='name'>on_extended_data</span>
- <span class='arguments'>(&amp;block)</span>
+ <span class='arguments'>(&block)</span>
</div>
<div class='description'>
- <p>
- Registers a callback on all component channels, to be invoked when the
- remote process emits &#8220;extended&#8221; data (typically on its
- <tt>stderr</tt> stream). The block will be invoked with three arguments:
- the specific channel object, an integer describing the data type (usually a
- 1 for <tt>stderr</tt>) and the data that was received.
- </p>
- <pre>channel.on_extended_data do |ch, type, data|&#x000A; puts &quot;got extended data: #{data}&quot;&#x000A;end</pre>
+
+ <p>Registers a callback on all component channels, to be invoked when the
+ remote process emits "extended" data (typically on its <code>stderr</code>
+ stream). The block will be invoked with three arguments: the specific
+ channel object, an integer describing the data type (usually a 1 for
+ <code>stderr</code>) and the data that was received.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_extended_data</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;got extended data: #{data}&quot;</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000021-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-on_extended_data-source'); return false">
[show source]
</a>
- <pre id='M000021-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 161</span>&#x000A;161: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_extended_data</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;162: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_extended_data</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;163: <span class="ruby-keyword kw">self</span>&#x000A;164: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-on_extended_data-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 161</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_extended_data</span>(&amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_extended_data</span>(&amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000025'>
- <a name='M000025'> </a>
+ <div class='method public-instance' id='method-method-i-on_open_failed'>
+ <a name='method-i-on_open_failed'></a>
<div class='synopsis'>
<span class='name'>on_open_failed</span>
- <span class='arguments'>(&amp;block)</span>
+ <span class='arguments'>(&block)</span>
</div>
<div class='description'>
- <p>
- Registers a callback on all component channels, to be invoked when the
+
+ <p>Registers a callback on all component channels, to be invoked when the
remote server is unable to open the channel. The callback will be invoked
- with three arguments: the channel object that couldn&#8217;t be opened, a
+ with three arguments: the channel object that couldn't be opened, a
description of the error (as a string), and an integer code representing
- the error.
- </p>
- <pre>channel.on_open_failed do |ch, description, code|&#x000A; # ...&#x000A;end</pre>
+ the error.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_open_failed</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">description</span>, <span class="ruby-identifier">code</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000025-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-on_open_failed-source'); return false">
[show source]
</a>
- <pre id='M000025-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 211</span>&#x000A;211: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_open_failed</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;212: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_open_failed</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;213: <span class="ruby-keyword kw">self</span>&#x000A;214: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-on_open_failed-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 211</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_open_failed</span>(&amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_open_failed</span>(&amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000022'>
- <a name='M000022'> </a>
+ <div class='method public-instance' id='method-method-i-on_process'>
+ <a name='method-i-on_process'></a>
<div class='synopsis'>
<span class='name'>on_process</span>
- <span class='arguments'>(&amp;block)</span>
+ <span class='arguments'>(&block)</span>
</div>
<div class='description'>
- <p>
- Registers a callback on all component channels, to be invoked during the
+
+ <p>Registers a callback on all component channels, to be invoked during the
idle portion of the connection event loop. The callback will be invoked
- with one argument: the specific channel object being processed.
- </p>
- <pre>channel.on_process do |ch|&#x000A; # ...&#x000A;end</pre>
+ with one argument: the specific channel object being processed.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_process</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000022-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-on_process-source'); return false">
[show source]
</a>
- <pre id='M000022-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 173</span>&#x000A;173: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_process</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;174: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_process</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;175: <span class="ruby-keyword kw">self</span>&#x000A;176: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-on_process-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 173</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_process</span>(&amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_process</span>(&amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000026'>
- <a name='M000026'> </a>
+ <div class='method public-instance' id='method-method-i-on_request'>
+ <a name='method-i-on_request'></a>
<div class='synopsis'>
<span class='name'>on_request</span>
- <span class='arguments'>(type, &amp;block)</span>
+ <span class='arguments'>(type, &block)</span>
</div>
<div class='description'>
- <p>
- Registers a callback on all component channels, to be invoked when the
- remote server sends a channel request of the given <tt>type</tt>. The
+
+ <p>Registers a callback on all component channels, to be invoked when the
+ remote server sends a channel request of the given <code>type</code>. The
callback will be invoked with two arguments: the specific channel object
receiving the request, and a Net::SSH::Buffer instance containing the
- request-specific data.
- </p>
- <pre>channel.on_request(&quot;exit-status&quot;) do |ch, data|&#x000A; puts &quot;exited with #{data.read_long}&quot;&#x000A;end</pre>
+ request-specific data.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_request</span>(<span class="ruby-string">&quot;exit-status&quot;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;exited with #{data.read_long}&quot;</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000026-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-on_request-source'); return false">
[show source]
</a>
- <pre id='M000026-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 225</span>&#x000A;225: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_request</span>(<span class="ruby-identifier">type</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;226: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_request</span>(<span class="ruby-identifier">type</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;227: <span class="ruby-keyword kw">self</span>&#x000A;228: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-on_request-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 225</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_request</span>(<span class="ruby-identifier">type</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_request</span>(<span class="ruby-identifier">type</span>, &amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000014'>
- <a name='M000014'> </a>
+ <div class='method public-instance' id='method-method-i-request_pty'>
+ <a name='method-i-request_pty'></a>
<div class='synopsis'>
<span class='name'>request_pty</span>
- <span class='arguments'>(opts={}, &amp;block)</span>
+ <span class='arguments'>(opts={}, &block)</span>
</div>
<div class='description'>
- <p>
- Perform a <tt><a href="Channel.html#M000014">request_pty</a></tt> command
- on all component channels. The block, if given, is passed to each component
- channel, so it will (potentially) be invoked once for every channel in the
- collection. The block will receive two parameters: the specific channel
- object being operated on, and a boolean indicating whether the pty request
- succeeded or not.
- </p>
- <pre>channel.request_pty do |ch, success|&#x000A; # ...&#x000A;end</pre>
- <p>
- See the documentation in <a href="../../SSH.html">Net::SSH</a> for
+
+ <p>Perform a <code>request_pty</code> command on all component channels. The
+ block, if given, is passed to each component channel, so it will
+ (potentially) be invoked once for every channel in the collection. The
+ block will receive two parameters: the specific channel object being
+ operated on, and a boolean indicating whether the pty request succeeded or
+ not.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span>.<span class="ruby-identifier">request_pty</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">success</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>See the documentation in <a href="../../SSH.html">Net::SSH</a> for
Net::SSH::Connection::Channel#request_pty for more information on how to
- work with the callback.
- </p>
+ work with the callback.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000014-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-request_pty-source'); return false">
[show source]
</a>
- <pre id='M000014-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 95</span>&#x000A;95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">request_pty</span>(<span class="ruby-identifier">opts</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;96: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">request_pty</span>(<span class="ruby-identifier">opts</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) }&#x000A;97: <span class="ruby-keyword kw">self</span>&#x000A;98: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-request_pty-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 95</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">request_pty</span>(<span class="ruby-identifier">opts</span>={}, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">request_pty</span>(<span class="ruby-identifier">opts</span>, &amp;<span class="ruby-identifier">block</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000015'>
- <a name='M000015'> </a>
+ <div class='method public-instance' id='method-method-i-send_data'>
+ <a name='method-i-send_data'></a>
<div class='synopsis'>
<span class='name'>send_data</span>
<span class='arguments'>(data)</span>
</div>
<div class='description'>
- <p>
- Send the given <tt>data</tt> to each component channel. It will be sent to
- the remote process, typically being received on the process&#8217;
- <tt>stdin</tt> stream.
- </p>
+
+ <p>Send the given <code>data</code> to each component channel. It will be sent
+ to the remote process, typically being received on the process'
+ <code>stdin</code> stream.</p>
+
<pre>channel.send_data &quot;password\n&quot;</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000015-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-send_data-source'); return false">
[show source]
</a>
- <pre id='M000015-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 104</span>&#x000A;104: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_data</span>(<span class="ruby-identifier">data</span>)&#x000A;105: <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">send_data</span>(<span class="ruby-identifier">data</span>) }&#x000A;106: <span class="ruby-keyword kw">self</span>&#x000A;107: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-send_data-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 104</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">send_data</span>(<span class="ruby-identifier">data</span>)&#x000A; <span class="ruby-identifier">channels</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">send_data</span>(<span class="ruby-identifier">data</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000017'>
- <a name='M000017'> </a>
+ <div class='method public-instance' id='method-method-i-wait'>
+ <a name='method-i-wait'></a>
<div class='synopsis'>
<span class='name'>wait</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Runs the connection&#8217;s event loop until the channel is no longer
- active (see <a href="Channel.html#M000016">active?</a>).
- </p>
+
+ <p>Runs the connection's event loop until the channel is no longer active (see
+ <a href="Channel.html#method-i-active-3F">active?</a>).</p>
+
<pre>channel.exec &quot;something&quot;&#x000A;channel.wait</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000017-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-wait-source'); return false">
[show source]
</a>
- <pre id='M000017-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel.rb, line 121</span>&#x000A;121: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">wait</span>&#x000A;122: <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">loop</span> { <span class="ruby-identifier">active?</span> }&#x000A;123: <span class="ruby-keyword kw">self</span>&#x000A;124: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-wait-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel.rb, line 121</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">wait</span>&#x000A; <span class="ruby-identifier">connection</span>.<span class="ruby-identifier">loop</span> { <span class="ruby-identifier">active?</span> }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -531,7 +539,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/ChannelProxy.html b/classes/Net/SSH/Multi/ChannelProxy.html
index 7a529c3..dfa3bb7 100644
--- a/classes/Net/SSH/Multi/ChannelProxy.html
+++ b/classes/Net/SSH/Multi/ChannelProxy.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::ChannelProxy [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::ChannelProxy</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,131 +26,134 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::ChannelProxy
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Object</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- The <a href="ChannelProxy.html">ChannelProxy</a> is a delegate class that
+
+ <p>The <a href="ChannelProxy.html">ChannelProxy</a> is a delegate class that
represents a channel that has not yet been opened. It is only used when <a
href="../Multi.html">Net::SSH::Multi</a> is running with with a concurrent
- connections limit (see Net::SSH::Multi::Session#concurrent_connections).
- </p>
- <p>
- You&#8217;ll never need to instantiate one of these directly, and will
- probably (if all goes well!) never even notice when one of these is in use.
+ connections limit (see <a
+ href="Session.html#attribute-i-concurrent_connections">Net::SSH::Multi::Session#concurrent_connections</a>).</p>
+
+ <p>You'll never need to instantiate one of these directly, and will probably
+ (if all goes well!) never even notice when one of these is in use.
Essentially, it is spawned by a <a
href="PendingConnection.html">Net::SSH::Multi::PendingConnection</a> when
the pending connection is asked to open a channel. Any actions performed on
the channel proxy will then be recorded, until a real channel is set as the
- delegate (see <a href="ChannelProxy.html#M000028">delegate_to</a>). At that
+ delegate (see <a
+ href="ChannelProxy.html#method-i-delegate_to">delegate_to</a>). At that
point, all recorded actions will be replayed on the channel, and any
- subsequent actions will be immediately delegated to the channel.
- </p>
+ subsequent actions will be immediately delegated to the channel.</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
<ol>
- <li><a href="#M000027">new</a></li>
+ <li><a target="docwin" href="#method-c-new">new</a></li>
</ol>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000028">delegate_to</a></li>
- <li><a href="#M000029">method_missing</a></li>
+ <li><a target="docwin" href="#method-i-delegate_to">delegate_to</a></li>
+ <li><a target="docwin" href="#method-i-method_missing">method_missing</a></li>
+ <li><a target="docwin" href="#attribute-i-on_confirm">on_confirm</a></li>
</ol>
</div>
+ <div id='context'>
+ </div>
<div id='section'>
<div id='attribute-list'>
<h2 class='section-bar'>Attributes</h2>
<div class='name-list'>
<table>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>on_confirm</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-on_confirm'>on_confirm</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- This is the &#8220;on confirm&#8221; callback that gets called when the
- real channel is opened.
+ <p>This is the "on confirm" callback that gets called when the real channel is
+ opened.</p>
</td>
</tr>
</table>
</div>
</div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000027'>
- <a name='M000027'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-new'>
+ <a name='method-c-new'></a>
<div class='synopsis'>
<span class='name'>new</span>
- <span class='arguments'>(&amp;on_confirm)</span>
+ <span class='arguments'>(&on_confirm)</span>
</div>
<div class='description'>
- <p>
- Instantiates a new channel proxy with the given <tt>on_confirm</tt>
- callback.
- </p>
+
+ <p>Instantiates a new channel proxy with the given <code>on_confirm</code>
+ callback.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000027-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-new-source'); return false">
[show source]
</a>
- <pre id='M000027-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel_proxy.rb, line 21</span>&#x000A;21: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">on_confirm</span>)&#x000A;22: <span class="ruby-ivar">@on_confirm</span> = <span class="ruby-identifier">on_confirm</span>&#x000A;23: <span class="ruby-ivar">@recordings</span> = []&#x000A;24: <span class="ruby-ivar">@channel</span> = <span class="ruby-keyword kw">nil</span>&#x000A;25: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-new-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel_proxy.rb, line 21</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(&amp;<span class="ruby-identifier">on_confirm</span>)&#x000A; <span class="ruby-ivar">@on_confirm</span> = <span class="ruby-identifier">on_confirm</span>&#x000A; <span class="ruby-ivar">@recordings</span> = []&#x000A; <span class="ruby-ivar">@channel</span> = <span class="ruby-keyword">nil</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000028'>
- <a name='M000028'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-delegate_to'>
+ <a name='method-i-delegate_to'></a>
<div class='synopsis'>
<span class='name'>delegate_to</span>
<span class='arguments'>(channel)</span>
</div>
<div class='description'>
- <p>
- Instructs the proxy to delegate all further actions to the given
- <tt>channel</tt> (which must be an instance of
+
+ <p>Instructs the proxy to delegate all further actions to the given
+ <code>channel</code> (which must be an instance of
Net::SSH::Connection::Channel). All recorded actions are immediately
- replayed, in order, against the delegate channel.
- </p>
+ replayed, in order, against the delegate channel.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000028-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-delegate_to-source'); return false">
[show source]
</a>
- <pre id='M000028-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel_proxy.rb, line 30</span>&#x000A;30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delegate_to</span>(<span class="ruby-identifier">channel</span>)&#x000A;31: <span class="ruby-ivar">@channel</span> = <span class="ruby-identifier">channel</span>&#x000A;32: <span class="ruby-ivar">@recordings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sym</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span><span class="ruby-operator">|</span>&#x000A;33: <span class="ruby-ivar">@channel</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;34: <span class="ruby-keyword kw">end</span>&#x000A;35: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-delegate_to-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel_proxy.rb, line 30</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">delegate_to</span>(<span class="ruby-identifier">channel</span>)&#x000A; <span class="ruby-ivar">@channel</span> = <span class="ruby-identifier">channel</span>&#x000A; <span class="ruby-ivar">@recordings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sym</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-ivar">@channel</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">sym</span>, *<span class="ruby-identifier">args</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000029'>
- <a name='M000029'> </a>
+ <div class='method public-instance' id='method-method-i-method_missing'>
+ <a name='method-i-method_missing'></a>
<div class='synopsis'>
<span class='name'>method_missing</span>
- <span class='arguments'>(sym, *args, &amp;block)</span>
+ <span class='arguments'>(sym, *args, &block)</span>
</div>
<div class='description'>
- <p>
- If a channel delegate has been specified (see <a
- href="ChannelProxy.html#M000028">delegate_to</a>), the method will be
- immediately sent to the delegate. Otherwise, the call is added to the list
- of recorded method calls, to be played back when a delegate is specified.
- </p>
+
+ <p>If a channel delegate has been specified (see <a
+ href="ChannelProxy.html#method-i-delegate_to">delegate_to</a>), the method
+ will be immediately sent to the delegate. Otherwise, the call is added to
+ the list of recorded method calls, to be played back when a delegate is
+ specified.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000029-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-method_missing-source'); return false">
[show source]
</a>
- <pre id='M000029-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/channel_proxy.rb, line 41</span>&#x000A;41: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;42: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@channel</span>&#x000A;43: <span class="ruby-ivar">@channel</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;44: <span class="ruby-keyword kw">else</span>&#x000A;45: <span class="ruby-ivar">@recordings</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>]&#x000A;46: <span class="ruby-keyword kw">end</span>&#x000A;47: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-method_missing-source'><span class="ruby-comment"># File lib/net/ssh/multi/channel_proxy.rb, line 41</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">sym</span>, *<span class="ruby-identifier">args</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-ivar">@channel</span>&#x000A; <span class="ruby-ivar">@channel</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">sym</span>, *<span class="ruby-identifier">args</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-ivar">@recordings</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">args</span>, <span class="ruby-identifier">block</span>]&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -160,7 +163,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/DynamicServer.html b/classes/Net/SSH/Multi/DynamicServer.html
index 2829095..376e0b3 100644
--- a/classes/Net/SSH/Multi/DynamicServer.html
+++ b/classes/Net/SSH/Multi/DynamicServer.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::DynamicServer [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::DynamicServer</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,206 +26,210 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::DynamicServer
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Object</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- Represents a lazily evaluated collection of servers. This will usually be
+
+ <p>Represents a lazily evaluated collection of servers. This will usually be
created via <a
- href="Session.html#M000069">Net::SSH::Multi::Session#use</a>(&amp;block),
+ href="Session.html#method-i-use">Net::SSH::Multi::Session#use</a>(&amp;block),
and is useful for creating server definitions where the name or address of
- the servers are not known until run-time.
- </p>
+ the servers are not known until run-time.</p>
+
<pre>session.use { lookup_ip_address_of_server }</pre>
- <p>
- This prevents <tt>lookup_ip_address_of_server</tt> from being invoked
+
+ <p>This prevents <code>lookup_ip_address_of_server</code> from being invoked
unless the server is actually needed, at which point it is invoked and the
- result cached.
- </p>
- <p>
- The callback should return either <tt>nil</tt> (in which case no new
+ result cached.</p>
+
+ <p>The callback should return either <code>nil</code> (in which case no new
servers are instantiated), a String (representing a connection
specification), an array of Strings, or an array of <a
- href="Server.html">Net::SSH::Multi::Server</a> instances.
- </p>
+ href="Server.html">Net::SSH::Multi::Server</a> instances.</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
<ol>
- <li><a href="#M000030">new</a></li>
+ <li><a target="docwin" href="#method-c-new">new</a></li>
</ol>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000031">[]</a></li>
- <li><a href="#M000032">[]=</a></li>
- <li><a href="#M000033">each</a></li>
- <li><a href="#M000034">evaluate!</a></li>
- <li><a href="#M000035">to_ary</a></li>
+ <li><a target="docwin" href="#method-i-5B-5D">[]</a></li>
+ <li><a target="docwin" href="#method-i-5B-5D-3D">[]=</a></li>
+ <li><a target="docwin" href="#attribute-i-callback">callback</a></li>
+ <li><a target="docwin" href="#method-i-each">each</a></li>
+ <li><a target="docwin" href="#method-i-evaluate-21">evaluate!</a></li>
+ <li><a target="docwin" href="#attribute-i-master">master</a></li>
+ <li><a target="docwin" href="#attribute-i-options">options</a></li>
</ol>
</div>
+ <div id='context'>
+ </div>
<div id='section'>
+ <div id='aliases-list'>
+ <h2>Public Instance Aliases</h2>
+ <div class='name-list'>
+ <table summary='Public Instance Aliases'>
+ <tr class='top-aligned-row context-row'>
+ <td class='context-item-name'>to_ary</td>
+ <td>-&gt;</td>
+ <td class='context-item-value'><a target="docwin" href="#method-i-evaluate-21">evaluate!</a></td>
+ </tr>
+ </table>
+ </div>
+ </div>
<div id='attribute-list'>
<h2 class='section-bar'>Attributes</h2>
<div class='name-list'>
<table>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>callback</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-callback'>callback</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The Proc object to call to evaluate the server(s)
+ <p>The Proc object to call to evaluate the server(s)</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>master</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-master'>master</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The <a href="Session.html">Net::SSH::Multi::Session</a> instance that owns
- this dynamic server record.
+ <p>The <a href="Session.html">Net::SSH::Multi::Session</a> instance that owns
+ this dynamic server record.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>options</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-options'>options</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The hash of options that will be used to initialize the server records.
+ <p>The hash of options that will be used to initialize the server records.</p>
</td>
</tr>
</table>
</div>
</div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000030'>
- <a name='M000030'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-new'>
+ <a name='method-c-new'></a>
<div class='synopsis'>
<span class='name'>new</span>
<span class='arguments'>(master, options, callback)</span>
</div>
<div class='description'>
- <p>
- Create a new <a href="DynamicServer.html">DynamicServer</a> record, owned
+
+ <p>Create a new <a href="DynamicServer.html">DynamicServer</a> record, owned
by the given <a href="Session.html">Net::SSH::Multi::Session</a>
- <tt>master</tt>, with the given hash of <tt>options</tt>, and using the
- given Proc <tt>callback</tt> to lazily evaluate the actual server
- instances.
- </p>
+ <code>master</code>, with the given hash of <code>options</code>, and using
+ the given Proc <code>callback</code> to lazily evaluate the actual server
+ instances.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000030-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-new-source'); return false">
[show source]
</a>
- <pre id='M000030-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/dynamic_server.rb, line 32</span>&#x000A;32: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">callback</span>)&#x000A;33: <span class="ruby-ivar">@master</span>, <span class="ruby-ivar">@options</span>, <span class="ruby-ivar">@callback</span> = <span class="ruby-identifier">master</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">callback</span>&#x000A;34: <span class="ruby-ivar">@servers</span> = <span class="ruby-keyword kw">nil</span>&#x000A;35: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-new-source'><span class="ruby-comment"># File lib/net/ssh/multi/dynamic_server.rb, line 32</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">callback</span>)&#x000A; <span class="ruby-ivar">@master</span>, <span class="ruby-ivar">@options</span>, <span class="ruby-ivar">@callback</span> = <span class="ruby-identifier">master</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">callback</span>&#x000A; <span class="ruby-ivar">@servers</span> = <span class="ruby-keyword">nil</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000031'>
- <a name='M000031'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-5B-5D'>
+ <a name='method-i-5B-5D'></a>
<div class='synopsis'>
<span class='name'>[]</span>
<span class='arguments'>(key)</span>
</div>
<div class='description'>
- <p>
- Returns the value for the given <tt>key</tt> in the :properties hash of the
- <tt>options</tt>. If no :properties hash exists in <tt>options</tt>, this
- returns <tt>nil</tt>.
- </p>
+
+ <p>Returns the value for the given <code>key</code> in the :properties hash of
+ the <code>options</code>. If no :properties hash exists in
+ <code>options</code>, this returns <code>nil</code>.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000031-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-5B-5D-source'); return false">
[show source]
</a>
- <pre id='M000031-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/dynamic_server.rb, line 39</span>&#x000A;39: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)&#x000A;40: (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:properties</span>] <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">key</span>]&#x000A;41: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-5B-5D-source'><span class="ruby-comment"># File lib/net/ssh/multi/dynamic_server.rb, line 39</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)&#x000A; (<span class="ruby-identifier">options</span>[<span class="ruby-value">:properties</span>] <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">key</span>]&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000032'>
- <a name='M000032'> </a>
+ <div class='method public-instance' id='method-method-i-5B-5D-3D'>
+ <a name='method-i-5B-5D-3D'></a>
<div class='synopsis'>
<span class='name'>[]=</span>
<span class='arguments'>(key, value)</span>
</div>
<div class='description'>
- <p>
- Sets the given key/value pair in the <tt>:properties</tt> key in the
+
+ <p>Sets the given key/value pair in the <code>:properties</code> key in the
options hash. If the options hash has no :properties key, it will be
- created.
- </p>
+ created.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000032-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-5B-5D-3D-source'); return false">
[show source]
</a>
- <pre id='M000032-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/dynamic_server.rb, line 45</span>&#x000A;45: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)&#x000A;46: (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:properties</span>] <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>&#x000A;47: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-5B-5D-3D-source'><span class="ruby-comment"># File lib/net/ssh/multi/dynamic_server.rb, line 45</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)&#x000A; (<span class="ruby-identifier">options</span>[<span class="ruby-value">:properties</span>] <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000033'>
- <a name='M000033'> </a>
+ <div class='method public-instance' id='method-method-i-each'>
+ <a name='method-i-each'></a>
<div class='synopsis'>
<span class='name'>each</span>
- <span class='arguments'>() {|server| ...}</span>
+ <span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Iterates over every instantiated server record in this dynamic server. If
+
+ <p>Iterates over every instantiated server record in this dynamic server. If
the servers have not yet been instantiated, this does nothing (e.g., it
does <em>not</em> automatically invoke <a
- href="DynamicServer.html#M000034">evaluate!</a>).
- </p>
+ href="DynamicServer.html#method-i-evaluate-21">evaluate!</a>).</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000033-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-each-source'); return false">
[show source]
</a>
- <pre id='M000033-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/dynamic_server.rb, line 52</span>&#x000A;52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>&#x000A;53: (<span class="ruby-ivar">@servers</span> <span class="ruby-operator">||</span> []).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">server</span> }&#x000A;54: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-each-source'><span class="ruby-comment"># File lib/net/ssh/multi/dynamic_server.rb, line 52</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>&#x000A; (<span class="ruby-ivar">@servers</span> <span class="ruby-operator">||</span> []).<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">server</span> }&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000034'>
- <a name='M000034'> </a>
+ <div class='method public-instance' id='method-method-i-evaluate-21'>
+ <a name='method-i-evaluate-21'></a>
<div class='synopsis'>
<span class='name'>evaluate!</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Evaluates the callback and instantiates the servers, memoizing the result.
- Subsequent calls to <a href="DynamicServer.html#M000034">evaluate!</a> will
- simply return the cached list of servers.
- </p>
+
+ <p>Evaluates the callback and instantiates the servers, memoizing the result.
+ Subsequent calls to <a
+ href="DynamicServer.html#method-i-evaluate-21">evaluate!</a> will simply
+ return the cached list of servers.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000034-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-evaluate-21-source'); return false">
[show source]
</a>
- <pre id='M000034-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/dynamic_server.rb, line 59</span>&#x000A;59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">evaluate!</span>&#x000A;60: <span class="ruby-ivar">@servers</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">callback</span>[<span class="ruby-identifier">options</span>]).<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A;61: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">server</span>&#x000A;62: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span><span class="ruby-operator">::</span><span class="ruby-constant">Server</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">server</span>, <span class="ruby-identifier">options</span>)&#x000A;63: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">server</span>&#x000A;64: <span class="ruby-keyword kw">end</span>&#x000A;65: <span class="ruby-keyword kw">end</span>&#x000A;66: <span class="ruby-keyword kw">end</span></pre>
- </div>
- </div>
- <div class='method public-instance' id='method-M000035'>
- <a name='M000035'> </a>
- <div class='synopsis'>
- <span class='name'>to_ary</span>
- <span class='arguments'>()</span>
- </div>
- <div class='description'>
- <p>
- Alias for <a href="DynamicServer.html#M000034">evaluate!</a>
- </p>
+ <pre id='method-i-evaluate-21-source'><span class="ruby-comment"># File lib/net/ssh/multi/dynamic_server.rb, line 59</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">evaluate!</span>&#x000A; <span class="ruby-ivar">@servers</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">callback</span>[<span class="ruby-identifier">options</span>]).<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-keyword">case</span> <span class="ruby-identifier">server</span>&#x000A; <span class="ruby-keyword">when</span> <span class="ruby-constant">String</span> <span class="ruby-keyword">then</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span><span class="ruby-operator">::</span><span class="ruby-constant">Server</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">server</span>, <span class="ruby-identifier">options</span>)&#x000A; <span class="ruby-keyword">else</span> <span class="ruby-identifier">server</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -235,7 +239,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/PendingConnection.html b/classes/Net/SSH/Multi/PendingConnection.html
index 9c59193..e77407a 100644
--- a/classes/Net/SSH/Multi/PendingConnection.html
+++ b/classes/Net/SSH/Multi/PendingConnection.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::PendingConnection [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::PendingConnection</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,271 +26,265 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::PendingConnection
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Object</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- A <a href="PendingConnection.html">PendingConnection</a> instance mimics a
+
+ <p>A <a href="PendingConnection.html">PendingConnection</a> instance mimics a
Net::SSH::Connection::Session instance, without actually being an open
connection to a server. It is used by <a
href="Session.html">Net::SSH::Multi::Session</a> when a concurrent
connection limit is in effect, so that a server can hang on to a
- &#8220;connection&#8221; that isn&#8217;t really a connection.
- </p>
- <p>
- Any requests against this connection (like <a
- href="PendingConnection.html#M000038">open_channel</a> or <a
- href="PendingConnection.html#M000039">send_global_request</a>) are not
- actually sent, but are added to a list of recordings. When the real session
- is opened and replaces this pending connection, all recorded actions will
- be replayed against that session.
- </p>
- <p>
- You&#8217;ll never need to initialize one of these directly, and (if all
- goes well!) should never even notice that one of these is in use. <a
+ "connection" that isn't really a connection.</p>
+
+ <p>Any requests against this connection (like <a
+ href="PendingConnection.html#method-i-open_channel">open_channel</a> or <a
+ href="PendingConnection.html#method-i-send_global_request">send_global_request</a>)
+ are not actually sent, but are added to a list of recordings. When the real
+ session is opened and replaces this pending connection, all recorded
+ actions will be replayed against that session.</p>
+
+ <p>You'll never need to initialize one of these directly, and (if all goes
+ well!) should never even notice that one of these is in use. <a
href="Session.html">Net::SSH::Multi::Session</a> will instantiate these as
- needed, and only when there is a concurrent connection limit.
- </p>
+ needed, and only when there is a concurrent connection limit.</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
<ol>
- <li><a href="#M000036">new</a></li>
+ <li><a target="docwin" href="#method-c-new">new</a></li>
</ol>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000040">busy?</a></li>
- <li><a href="#M000042">channels</a></li>
- <li><a href="#M000041">close</a></li>
- <li><a href="#M000045">listeners</a></li>
- <li><a href="#M000038">open_channel</a></li>
- <li><a href="#M000044">postprocess</a></li>
- <li><a href="#M000043">preprocess</a></li>
- <li><a href="#M000037">replace_with</a></li>
- <li><a href="#M000039">send_global_request</a></li>
+ <li><a target="docwin" href="#method-i-busy-3F">busy?</a></li>
+ <li><a target="docwin" href="#method-i-channels">channels</a></li>
+ <li><a target="docwin" href="#method-i-close">close</a></li>
+ <li><a target="docwin" href="#method-i-listeners">listeners</a></li>
+ <li><a target="docwin" href="#method-i-open_channel">open_channel</a></li>
+ <li><a target="docwin" href="#method-i-postprocess">postprocess</a></li>
+ <li><a target="docwin" href="#method-i-preprocess">preprocess</a></li>
+ <li><a target="docwin" href="#method-i-replace_with">replace_with</a></li>
+ <li><a target="docwin" href="#method-i-send_global_request">send_global_request</a></li>
+ <li><a target="docwin" href="#attribute-i-server">server</a></li>
</ol>
</div>
+ <div id='context'>
+ </div>
<div id='section'>
<div id='attribute-list'>
<h2 class='section-bar'>Attributes</h2>
<div class='name-list'>
<table>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>server</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-server'>server</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The <a href="Server.html">Net::SSH::Multi::Server</a> object that
- &#8220;owns&#8221; this pending connection.
+ <p>The <a href="Server.html">Net::SSH::Multi::Server</a> object that "owns"
+ this pending connection.</p>
</td>
</tr>
</table>
</div>
</div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000036'>
- <a name='M000036'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-new'>
+ <a name='method-c-new'></a>
<div class='synopsis'>
<span class='name'>new</span>
<span class='arguments'>(server)</span>
</div>
<div class='description'>
- <p>
- Instantiates a new pending connection for the given <a
- href="Server.html">Net::SSH::Multi::Server</a> object.
- </p>
+
+ <p>Instantiates a new pending connection for the given <a
+ href="Server.html">Net::SSH::Multi::Server</a> object.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000036-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-new-source'); return false">
[show source]
</a>
- <pre id='M000036-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 52</span>&#x000A;52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">server</span>)&#x000A;53: <span class="ruby-ivar">@server</span> = <span class="ruby-identifier">server</span>&#x000A;54: <span class="ruby-ivar">@recordings</span> = []&#x000A;55: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-new-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 52</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">server</span>)&#x000A; <span class="ruby-ivar">@server</span> = <span class="ruby-identifier">server</span>&#x000A; <span class="ruby-ivar">@recordings</span> = []&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000040'>
- <a name='M000040'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-busy-3F'>
+ <a name='method-i-busy-3F'></a>
<div class='synopsis'>
<span class='name'>busy?</span>
<span class='arguments'>(include_invisible=false)</span>
</div>
<div class='description'>
- <p>
- Always returns <tt>true</tt>, so that the pending connection looks active
- until it can be truly opened and replaced with a real connection.
- </p>
+
+ <p>Always returns <code>true</code>, so that the pending connection looks
+ active until it can be truly opened and replaced with a real connection.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000040-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-busy-3F-source'); return false">
[show source]
</a>
- <pre id='M000040-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 82</span>&#x000A;82: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>=<span class="ruby-keyword kw">false</span>)&#x000A;83: <span class="ruby-keyword kw">true</span>&#x000A;84: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-busy-3F-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 82</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>=<span class="ruby-keyword">false</span>)&#x000A; <span class="ruby-keyword">true</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000042'>
- <a name='M000042'> </a>
+ <div class='method public-instance' id='method-method-i-channels'>
+ <a name='method-i-channels'></a>
<div class='synopsis'>
<span class='name'>channels</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns an empty array, since a pending connection cannot have any real
- channels.
- </p>
+
+ <p>Returns an empty array, since a pending connection cannot have any real
+ channels.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000042-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-channels-source'); return false">
[show source]
</a>
- <pre id='M000042-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 92</span>&#x000A;92: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">channels</span>&#x000A;93: []&#x000A;94: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-channels-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 92</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">channels</span>&#x000A; []&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000041'>
- <a name='M000041'> </a>
+ <div class='method public-instance' id='method-method-i-close'>
+ <a name='method-i-close'></a>
<div class='synopsis'>
<span class='name'>close</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Does nothing, except to make a pending connection quack like a real
- connection.
- </p>
+
+ <p>Does nothing, except to make a pending connection quack like a real
+ connection.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000041-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-close-source'); return false">
[show source]
</a>
- <pre id='M000041-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 87</span>&#x000A;87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>&#x000A;88: <span class="ruby-keyword kw">self</span>&#x000A;89: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-close-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 87</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">close</span>&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000045'>
- <a name='M000045'> </a>
+ <div class='method public-instance' id='method-method-i-listeners'>
+ <a name='method-i-listeners'></a>
<div class='synopsis'>
<span class='name'>listeners</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns an empty hash, since a pending connection has no real listeners.
- </p>
+
+ <p>Returns an empty hash, since a pending connection has no real listeners.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000045-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-listeners-source'); return false">
[show source]
</a>
- <pre id='M000045-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 107</span>&#x000A;107: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listeners</span>&#x000A;108: {}&#x000A;109: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-listeners-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 107</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">listeners</span>&#x000A; {}&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000038'>
- <a name='M000038'> </a>
+ <div class='method public-instance' id='method-method-i-open_channel'>
+ <a name='method-i-open_channel'></a>
<div class='synopsis'>
<span class='name'>open_channel</span>
- <span class='arguments'>(type=&quot;session&quot;, *extras, &amp;on_confirm)</span>
+ <span class='arguments'>(type="session", *extras, &on_confirm)</span>
</div>
<div class='description'>
- <p>
- Records that a channel open request has been made, and returns a new <a
+
+ <p>Records that a channel open request has been made, and returns a new <a
href="ChannelProxy.html">Net::SSH::Multi::ChannelProxy</a> object to
- represent the (as yet unopened) channel.
- </p>
+ represent the (as yet unopened) channel.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000038-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-open_channel-source'); return false">
[show source]
</a>
- <pre id='M000038-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 67</span>&#x000A;67: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open_channel</span>(<span class="ruby-identifier">type</span>=<span class="ruby-value str">&quot;session&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">extras</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">on_confirm</span>)&#x000A;68: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">ChannelProxy</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">on_confirm</span>)&#x000A;69: <span class="ruby-ivar">@recordings</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">ChannelOpenRecording</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">extras</span>, <span class="ruby-identifier">channel</span>)&#x000A;70: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">channel</span>&#x000A;71: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-open_channel-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 67</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">open_channel</span>(<span class="ruby-identifier">type</span>=<span class="ruby-string">&quot;session&quot;</span>, *<span class="ruby-identifier">extras</span>, &amp;<span class="ruby-identifier">on_confirm</span>)&#x000A; <span class="ruby-identifier">channel</span> = <span class="ruby-constant">ChannelProxy</span>.<span class="ruby-identifier">new</span>(&amp;<span class="ruby-identifier">on_confirm</span>)&#x000A; <span class="ruby-ivar">@recordings</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">ChannelOpenRecording</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">extras</span>, <span class="ruby-identifier">channel</span>)&#x000A; <span class="ruby-keyword">return</span> <span class="ruby-identifier">channel</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000044'>
- <a name='M000044'> </a>
+ <div class='method public-instance' id='method-method-i-postprocess'>
+ <a name='method-i-postprocess'></a>
<div class='synopsis'>
<span class='name'>postprocess</span>
<span class='arguments'>(readers, writers)</span>
</div>
<div class='description'>
- <p>
- Returns <tt>true</tt>, and does nothing else.
- </p>
+
+ <p>Returns <code>true</code>, and does nothing else.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000044-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-postprocess-source'); return false">
[show source]
</a>
- <pre id='M000044-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 102</span>&#x000A;102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">postprocess</span>(<span class="ruby-identifier">readers</span>, <span class="ruby-identifier">writers</span>)&#x000A;103: <span class="ruby-keyword kw">true</span>&#x000A;104: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-postprocess-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 102</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">postprocess</span>(<span class="ruby-identifier">readers</span>, <span class="ruby-identifier">writers</span>)&#x000A; <span class="ruby-keyword">true</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000043'>
- <a name='M000043'> </a>
+ <div class='method public-instance' id='method-method-i-preprocess'>
+ <a name='method-i-preprocess'></a>
<div class='synopsis'>
<span class='name'>preprocess</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns <tt>true</tt>, and does nothing else.
- </p>
+
+ <p>Returns <code>true</code>, and does nothing else.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000043-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-preprocess-source'); return false">
[show source]
</a>
- <pre id='M000043-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 97</span>&#x000A;97: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">preprocess</span>&#x000A;98: <span class="ruby-keyword kw">true</span>&#x000A;99: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-preprocess-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 97</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">preprocess</span>&#x000A; <span class="ruby-keyword">true</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000037'>
- <a name='M000037'> </a>
+ <div class='method public-instance' id='method-method-i-replace_with'>
+ <a name='method-i-replace_with'></a>
<div class='synopsis'>
<span class='name'>replace_with</span>
<span class='arguments'>(session)</span>
</div>
<div class='description'>
- <p>
- Instructs the pending session to replay all of its recordings against the
- given <tt>session</tt>, and to then replace itself with the given session.
- </p>
+
+ <p>Instructs the pending session to replay all of its recordings against the
+ given <code>session</code>, and to then replace itself with the given
+ session.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000037-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-replace_with-source'); return false">
[show source]
</a>
- <pre id='M000037-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 59</span>&#x000A;59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">replace_with</span>(<span class="ruby-identifier">session</span>)&#x000A;60: <span class="ruby-ivar">@recordings</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">recording</span><span class="ruby-operator">|</span> <span class="ruby-identifier">recording</span>.<span class="ruby-identifier">replay_on</span>(<span class="ruby-identifier">session</span>) }&#x000A;61: <span class="ruby-ivar">@server</span>.<span class="ruby-identifier">replace_session</span>(<span class="ruby-identifier">session</span>)&#x000A;62: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-replace_with-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 59</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">replace_with</span>(<span class="ruby-identifier">session</span>)&#x000A; <span class="ruby-ivar">@recordings</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">recording</span><span class="ruby-operator">|</span> <span class="ruby-identifier">recording</span>.<span class="ruby-identifier">replay_on</span>(<span class="ruby-identifier">session</span>) }&#x000A; <span class="ruby-ivar">@server</span>.<span class="ruby-identifier">replace_session</span>(<span class="ruby-identifier">session</span>)&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000039'>
- <a name='M000039'> </a>
+ <div class='method public-instance' id='method-method-i-send_global_request'>
+ <a name='method-i-send_global_request'></a>
<div class='synopsis'>
<span class='name'>send_global_request</span>
- <span class='arguments'>(type, *extra, &amp;callback)</span>
+ <span class='arguments'>(type, *extra, &callback)</span>
</div>
<div class='description'>
- <p>
- Records that a global request has been made. The request is not actually
- sent, and won&#8217;t be until <a
- href="PendingConnection.html#M000037">replace_with</a> is called.
- </p>
+
+ <p>Records that a global request has been made. The request is not actually
+ sent, and won't be until <a
+ href="PendingConnection.html#method-i-replace_with">replace_with</a> is
+ called.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000039-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-send_global_request-source'); return false">
[show source]
</a>
- <pre id='M000039-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/pending_connection.rb, line 75</span>&#x000A;75: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_global_request</span>(<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">extra</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">callback</span>)&#x000A;76: <span class="ruby-ivar">@recordings</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">SendGlobalRequestRecording</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">extra</span>, <span class="ruby-identifier">callback</span>)&#x000A;77: <span class="ruby-keyword kw">self</span>&#x000A;78: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-send_global_request-source'><span class="ruby-comment"># File lib/net/ssh/multi/pending_connection.rb, line 75</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">send_global_request</span>(<span class="ruby-identifier">type</span>, *<span class="ruby-identifier">extra</span>, &amp;<span class="ruby-identifier">callback</span>)&#x000A; <span class="ruby-ivar">@recordings</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">SendGlobalRequestRecording</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">extra</span>, <span class="ruby-identifier">callback</span>)&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -300,7 +294,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/Server.html b/classes/Net/SSH/Multi/Server.html
index 17be26b..61a38cf 100644
--- a/classes/Net/SSH/Multi/Server.html
+++ b/classes/Net/SSH/Multi/Server.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::Server [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::Server</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,50 +26,54 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::Server
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Object</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- Encapsulates the connection information for a single remote server, as well
+
+ <p>Encapsulates the connection information for a single remote server, as well
as the <a href="../../SSH.html">Net::SSH</a> session corresponding to that
- information. You&#8217;ll rarely need to instantiate one of these directly:
+ information. You'll rarely need to instantiate one of these directly:
instead, you should use <a
- href="Session.html#M000069">Net::SSH::Multi::Session#use</a>.
- </p>
+ href="Session.html#method-i-use">Net::SSH::Multi::Session#use</a>.</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
<ol>
- <li><a href="#M000046">new</a></li>
+ <li><a target="docwin" href="#method-c-new">new</a></li>
</ol>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000050">&lt;=&gt;</a></li>
- <li><a href="#M000047">[]</a></li>
- <li><a href="#M000048">[]=</a></li>
- <li><a href="#M000057">busy?</a></li>
- <li><a href="#M000058">close</a></li>
- <li><a href="#M000055">fail!</a></li>
- <li><a href="#M000054">failed?</a></li>
- <li><a href="#M000051">hash</a></li>
- <li><a href="#M000053">inspect</a></li>
- <li><a href="#M000049">port</a></li>
- <li><a href="#M000056">session</a></li>
- <li><a href="#M000052">to_s</a></li>
+ <li><a target="docwin" href="#method-i-3C-3D-3E"><=></a></li>
+ <li><a target="docwin" href="#method-i-5B-5D">[]</a></li>
+ <li><a target="docwin" href="#method-i-5B-5D-3D">[]=</a></li>
+ <li><a target="docwin" href="#method-i-busy-3F">busy?</a></li>
+ <li><a target="docwin" href="#method-i-close">close</a></li>
+ <li><a target="docwin" href="#method-i-fail-21">fail!</a></li>
+ <li><a target="docwin" href="#method-i-failed-3F">failed?</a></li>
+ <li><a target="docwin" href="#attribute-i-gateway">gateway</a></li>
+ <li><a target="docwin" href="#method-i-hash">hash</a></li>
+ <li><a target="docwin" href="#attribute-i-host">host</a></li>
+ <li><a target="docwin" href="#method-i-inspect">inspect</a></li>
+ <li><a target="docwin" href="#attribute-i-master">master</a></li>
+ <li><a target="docwin" href="#attribute-i-options">options</a></li>
+ <li><a target="docwin" href="#method-i-port">port</a></li>
+ <li><a target="docwin" href="#method-i-session">session</a></li>
+ <li><a target="docwin" href="#method-i-to_s">to_s</a></li>
+ <li><a target="docwin" href="#attribute-i-user">user</a></li>
</ol>
</div>
<div id='context'>
@@ -81,348 +85,333 @@
</div>
</div>
<div id='section'>
- <div id='aliases-list'>
- <h2>External Aliases</h2>
- <div class='name-list'>
- <table summary='External aliases'>
- <tr class='top-aligned-row context-row'>
- <td class='context-item-name'>==</td>
- <td>-&gt;</td>
- <td class='context-item-value'>eql?</td>
- </tr>
- </table>
- </div>
- </div>
<div id='attribute-list'>
<h2 class='section-bar'>Attributes</h2>
<div class='name-list'>
<table>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>gateway</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-gateway'>gateway</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The Net::SSH::Gateway instance to use to establish the connection. Will be
- <tt>nil</tt> if the connection should be established without a gateway.
+ <p>The Net::SSH::Gateway instance to use to establish the connection. Will be
+ <code>nil</code> if the connection should be established without a gateway.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>host</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-host'>host</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The host name (or IP address) of the server to connect to.
+ <p>The host name (or IP address) of the server to connect to.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>master</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-master'>master</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The <a href="Session.html">Net::SSH::Multi::Session</a> instance that
- manages this server instance.
+ <p>The <a href="Session.html">Net::SSH::Multi::Session</a> instance that
+ manages this server instance.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>options</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-options'>options</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The Hash of additional options to pass to <a
+ <p>The Hash of additional options to pass to <a
href="../../SSH.html">Net::SSH</a> when connecting (including things like
- :password, and so forth).
+ :password, and so forth).</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>user</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-user'>user</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The user name to use when logging into the server.
+ <p>The user name to use when logging into the server.</p>
</td>
</tr>
</table>
</div>
</div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000046'>
- <a name='M000046'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-new'>
+ <a name='method-c-new'></a>
<div class='synopsis'>
<span class='name'>new</span>
<span class='arguments'>(master, host, options={})</span>
</div>
<div class='description'>
- <p>
- Creates a new <a href="Server.html">Server</a> instance with the given
- connection information. The <tt>master</tt> argument must be a reference to
- the <a href="Session.html">Net::SSH::Multi::Session</a> instance that will
- manage this server reference. The <tt>options</tt> hash must conform to the
- options described for Net::SSH::start, with two additions:
- </p>
- <ul>
- <li>:via => a Net::SSH::Gateway instance to use when establishing a connection
- to this server.
- </li>
- <li>:user => the name of the user to use when logging into this server.
+ <p>Creates a new <a href="Server.html">Server</a> instance with the given
+ connection information. The <code>master</code> argument must be a
+ reference to the <a href="Session.html">Net::SSH::Multi::Session</a>
+ instance that will manage this server reference. The <code>options</code>
+ hash must conform to the options described for Net::SSH::start, with two
+ additions:</p>
+ <ul><li>
+ <p>:via =&gt; a Net::SSH::Gateway instance to use when establishing a
+ connection to this server.</p>
+ </li><li>
+ <p>:user =&gt; the name of the user to use when logging into this server.</p>
+ </li></ul>
- </li>
- </ul>
- <p>
- The <tt>host</tt> argument may include the username and port number, in
+ <p>The <code>host</code> argument may include the username and port number, in
which case those values take precedence over similar values given in the
- <tt>options</tt>:
- </p>
+ <code>options</code>:</p>
+
<pre>server = Net::SSH::Multi::Server.new(session, 'user@host:1234')&#x000A;puts server.user #-&gt; user&#x000A;puts server.port #-&gt; 1234</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000046-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-new-source'); return false">
[show source]
</a>
- <pre id='M000046-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 43</span>&#x000A;43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">host</span>, <span class="ruby-identifier">options</span>={})&#x000A;44: <span class="ruby-ivar">@master</span> = <span class="ruby-identifier">master</span>&#x000A;45: <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>&#x000A;46: &#x000A;47: <span class="ruby-ivar">@user</span>, <span class="ruby-ivar">@host</span>, <span class="ruby-identifier">port</span> = <span class="ruby-identifier">host</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp re">/^(?:([^;,:=]+)@|)(.*?)(?::(\d+)|)$/</span>)[<span class="ruby-value">1</span>,<span class="ruby-value">3</span>]&#x000A;48: &#x000A;49: <span class="ruby-identifier">user_opt</span>, <span class="ruby-identifier">port_opt</span> = <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:user</span>), <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:port</span>)&#x000A;50: &#x000A;51: <span class="ruby-ivar">@user</span> = <span class="ruby-ivar">@user</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">user_opt</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">master</span>.<span class="ruby-identifier">default_user</span>&#x000A;52: <span class="ruby-identifier">port</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">port_opt</span>&#x000A;53: &#x000A;54: <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:port</span>] = <span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">port</span>&#x000A;55: &#x000A;56: <span class="ruby-ivar">@gateway</span> = <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:via</span>)&#x000A;57: <span class="ruby-ivar">@failed</span> = <span class="ruby-keyword kw">false</span>&#x000A;58: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-new-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 43</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">host</span>, <span class="ruby-identifier">options</span>={})&#x000A; <span class="ruby-ivar">@master</span> = <span class="ruby-identifier">master</span>&#x000A; <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">dup</span>&#x000A;&#x000A; <span class="ruby-ivar">@user</span>, <span class="ruby-ivar">@host</span>, <span class="ruby-identifier">port</span> = <span class="ruby-identifier">host</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r^(?:([^;,:=]+)@|)(.*?)(?::(\d+)|)$/</span>)[<span class="ruby-value">1</span>,<span class="ruby-value">3</span>]&#x000A;&#x000A; <span class="ruby-identifier">user_opt</span>, <span class="ruby-identifier">port_opt</span> = <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:user</span>), <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:port</span>)&#x000A;&#x000A; <span class="ruby-ivar">@user</span> = <span class="ruby-ivar">@user</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">user_opt</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">master</span>.<span class="ruby-identifier">default_user</span>&#x000A; <span class="ruby-identifier">port</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">port_opt</span>&#x000A;&#x000A; <span class="ruby-ivar">@options</span>[<span class="ruby-value">:port</span>] = <span class="ruby-identifier">port</span>.<span class="ruby-identifier">to_i</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">port</span>&#x000A;&#x000A; <span class="ruby-ivar">@gateway</span> = <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value">:via</span>)&#x000A; <span class="ruby-ivar">@failed</span> = <span class="ruby-keyword">false</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000050'>
- <a name='M000050'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-3C-3D-3E'>
+ <a name='method-i-3C-3D-3E'></a>
<div class='synopsis'>
- <span class='name'>&lt;=&gt;</span>
+ <span class='name'><=></span>
<span class='arguments'>(server)</span>
</div>
<div class='description'>
- <p>
- Gives server definitions a sort order, and allows comparison.
- </p>
+
+ <p>Gives server definitions a sort order, and allows comparison.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000050-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-3C-3D-3E-source'); return false">
[show source]
</a>
- <pre id='M000050-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 79</span>&#x000A;79: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;=&gt;</span>(<span class="ruby-identifier">server</span>)&#x000A;80: [<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">user</span>] <span class="ruby-operator">&lt;=&gt;</span> [<span class="ruby-identifier">server</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">server</span>.<span class="ruby-identifier">port</span>, <span class="ruby-identifier">server</span>.<span class="ruby-identifier">user</span>]&#x000A;81: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-3C-3D-3E-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 79</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-operator">&lt;=&gt;</span>(<span class="ruby-identifier">server</span>)&#x000A; [<span class="ruby-identifier">host</span>, <span class="ruby-identifier">port</span>, <span class="ruby-identifier">user</span>] <span class="ruby-operator">&lt;=&gt;</span> [<span class="ruby-identifier">server</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">server</span>.<span class="ruby-identifier">port</span>, <span class="ruby-identifier">server</span>.<span class="ruby-identifier">user</span>]&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000047'>
- <a name='M000047'> </a>
+ <div class='method public-instance' id='method-method-i-5B-5D'>
+ <a name='method-i-5B-5D'></a>
<div class='synopsis'>
<span class='name'>[]</span>
<span class='arguments'>(key)</span>
</div>
<div class='description'>
- <p>
- Returns the value of the server property with the given <tt>key</tt>. <a
- href="Server.html">Server</a> properties are described via the
- <tt>:properties</tt> key in the options hash when defining the <a
- href="Server.html">Server</a>.
- </p>
+
+ <p>Returns the value of the server property with the given <code>key</code>.
+ <a href="Server.html">Server</a> properties are described via the
+ <code>:properties</code> key in the options hash when defining the <a
+ href="Server.html">Server</a>.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000047-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-5B-5D-source'); return false">
[show source]
</a>
- <pre id='M000047-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 63</span>&#x000A;63: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)&#x000A;64: (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:properties</span>] <span class="ruby-operator">||</span> {})[<span class="ruby-identifier">key</span>]&#x000A;65: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-5B-5D-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 63</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">key</span>)&#x000A; (<span class="ruby-identifier">options</span>[<span class="ruby-value">:properties</span>] <span class="ruby-operator">||</span> {})[<span class="ruby-identifier">key</span>]&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000048'>
- <a name='M000048'> </a>
+ <div class='method public-instance' id='method-method-i-5B-5D-3D'>
+ <a name='method-i-5B-5D-3D'></a>
<div class='synopsis'>
<span class='name'>[]=</span>
<span class='arguments'>(key, value)</span>
</div>
<div class='description'>
- <p>
- Sets the given key/value pair in the <tt>:properties</tt> key in the
+
+ <p>Sets the given key/value pair in the <code>:properties</code> key in the
options hash. If the options hash has no :properties key, it will be
- created.
- </p>
+ created.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000048-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-5B-5D-3D-source'); return false">
[show source]
</a>
- <pre id='M000048-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 69</span>&#x000A;69: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)&#x000A;70: (<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:properties</span>] <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>&#x000A;71: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-5B-5D-3D-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 69</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-operator">[]=</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)&#x000A; (<span class="ruby-identifier">options</span>[<span class="ruby-value">:properties</span>] <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000057'>
- <a name='M000057'> </a>
+ <div class='method public-instance' id='method-method-i-busy-3F'>
+ <a name='method-i-busy-3F'></a>
<div class='synopsis'>
<span class='name'>busy?</span>
<span class='arguments'>(include_invisible=false)</span>
</div>
<div class='description'>
- <p>
- Returns <tt>true</tt> if the session has been opened, and the session is
- currently busy (as defined by Net::SSH::Connection::Session#busy?).
- </p>
+
+ <p>Returns <code>true</code> if the session has been opened, and the session
+ is currently busy (as defined by Net::SSH::Connection::Session#busy?).</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000057-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-busy-3F-source'); return false">
[show source]
</a>
- <pre id='M000057-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 143</span>&#x000A;143: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>=<span class="ruby-keyword kw">false</span>)&#x000A;144: <span class="ruby-identifier">session</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">session</span>.<span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>)&#x000A;145: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-busy-3F-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 143</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>=<span class="ruby-keyword">false</span>)&#x000A; <span class="ruby-identifier">session</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">session</span>.<span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>)&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000058'>
- <a name='M000058'> </a>
+ <div class='method public-instance' id='method-method-i-close'>
+ <a name='method-i-close'></a>
<div class='synopsis'>
<span class='name'>close</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Closes this server&#8217;s session. If the session has not yet been opened,
- this does nothing.
- </p>
+
+ <p>Closes this server's session. If the session has not yet been opened, this
+ does nothing.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000058-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-close-source'); return false">
[show source]
</a>
- <pre id='M000058-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 149</span>&#x000A;149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>&#x000A;150: <span class="ruby-identifier">session</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">session</span>&#x000A;151: <span class="ruby-keyword kw">ensure</span>&#x000A;152: <span class="ruby-identifier">master</span>.<span class="ruby-identifier">server_closed</span>(<span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">session</span>&#x000A;153: <span class="ruby-ivar">@session</span> = <span class="ruby-keyword kw">nil</span>&#x000A;154: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-close-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 149</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">close</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">session</span>&#x000A;<span class="ruby-keyword">ensure</span>&#x000A; <span class="ruby-identifier">master</span>.<span class="ruby-identifier">server_closed</span>(<span class="ruby-keyword">self</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">session</span>&#x000A; <span class="ruby-ivar">@session</span> = <span class="ruby-keyword">nil</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000055'>
- <a name='M000055'> </a>
+ <div class='method public-instance' id='method-method-i-fail-21'>
+ <a name='method-i-fail-21'></a>
<div class='synopsis'>
<span class='name'>fail!</span>
<span class='arguments'>(flag=true)</span>
</div>
<div class='description'>
- <p>
- Indicates (by default) that this server has just failed a connection
- attempt. If <tt>flag</tt> is false, this can be used to reset the failed
- flag so that a retry may be attempted.
- </p>
+
+ <p>Indicates (by default) that this server has just failed a connection
+ attempt. If <code>flag</code> is false, this can be used to reset the
+ failed flag so that a retry may be attempted.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000055-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-fail-21-source'); return false">
[show source]
</a>
- <pre id='M000055-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 115</span>&#x000A;115: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fail!</span>(<span class="ruby-identifier">flag</span>=<span class="ruby-keyword kw">true</span>)&#x000A;116: <span class="ruby-ivar">@failed</span> = <span class="ruby-identifier">flag</span>&#x000A;117: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-fail-21-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 115</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">fail!</span>(<span class="ruby-identifier">flag</span>=<span class="ruby-keyword">true</span>)&#x000A; <span class="ruby-ivar">@failed</span> = <span class="ruby-identifier">flag</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000054'>
- <a name='M000054'> </a>
+ <div class='method public-instance' id='method-method-i-failed-3F'>
+ <a name='method-i-failed-3F'></a>
<div class='synopsis'>
<span class='name'>failed?</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns <tt>true</tt> if this server has ever failed a connection attempt.
- </p>
+
+ <p>Returns <code>true</code> if this server has ever failed a connection
+ attempt.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000054-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-failed-3F-source'); return false">
[show source]
</a>
- <pre id='M000054-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 108</span>&#x000A;108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failed?</span>&#x000A;109: <span class="ruby-ivar">@failed</span>&#x000A;110: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-failed-3F-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 108</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">failed?</span>&#x000A; <span class="ruby-ivar">@failed</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000051'>
- <a name='M000051'> </a>
+ <div class='method public-instance' id='method-method-i-hash'>
+ <a name='method-i-hash'></a>
<div class='synopsis'>
<span class='name'>hash</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Generates a <tt>Fixnum</tt> hash value for this object. This function has
- the property that +a.eql?(b)+ implies +a.hash == b.hash+. The hash value is
- used by class <tt>Hash</tt>. Any hash value that exceeds the capacity of a
- <tt>Fixnum</tt> will be truncated before being used.
- </p>
+
+ <p>Generates a <code>Fixnum</code> hash value for this object. This function
+ has the property that +a.eql?(b)+ implies +a.hash == b.hash+. The hash
+ value is used by class <code>Hash</code>. Any hash value that exceeds the
+ capacity of a <code>Fixnum</code> will be truncated before being used.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000051-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-hash-source'); return false">
[show source]
</a>
- <pre id='M000051-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 89</span>&#x000A;89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span>&#x000A;90: <span class="ruby-ivar">@hash</span> <span class="ruby-operator">||=</span> [<span class="ruby-identifier">host</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">port</span>].<span class="ruby-identifier">hash</span>&#x000A;91: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-hash-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 89</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">hash</span>&#x000A; <span class="ruby-ivar">@hash</span> <span class="ruby-operator">||=</span> [<span class="ruby-identifier">host</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">port</span>].<span class="ruby-identifier">hash</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000053'>
- <a name='M000053'> </a>
+ <div class='method public-instance' id='method-method-i-inspect'>
+ <a name='method-i-inspect'></a>
<div class='synopsis'>
<span class='name'>inspect</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns a human-readable representation of this server instance.
- </p>
+
+ <p>Returns a human-readable representation of this server instance.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000053-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-inspect-source'); return false">
[show source]
</a>
- <pre id='M000053-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 103</span>&#x000A;103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>&#x000A;104: <span class="ruby-ivar">@inspect</span> <span class="ruby-operator">||=</span> <span class="ruby-value str">&quot;#&lt;%s:0x%x %s&gt;&quot;</span> <span class="ruby-operator">%</span> [<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">object_id</span>, <span class="ruby-identifier">to_s</span>]&#x000A;105: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-inspect-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 103</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">inspect</span>&#x000A; <span class="ruby-ivar">@inspect</span> <span class="ruby-operator">||=</span> <span class="ruby-node">&quot;#&lt;%s:0x%x %s&gt;&quot;</span> <span class="ruby-operator">%</span> [<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">object_id</span>, <span class="ruby-identifier">to_s</span>]&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000049'>
- <a name='M000049'> </a>
+ <div class='method public-instance' id='method-method-i-port'>
+ <a name='method-i-port'></a>
<div class='synopsis'>
<span class='name'>port</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns the port number to use for this connection.
- </p>
+
+ <p>Returns the port number to use for this connection.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000049-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-port-source'); return false">
[show source]
</a>
- <pre id='M000049-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 74</span>&#x000A;74: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">port</span>&#x000A;75: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:port</span>] <span class="ruby-operator">||</span> <span class="ruby-value">22</span>&#x000A;76: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-port-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 74</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">port</span>&#x000A; <span class="ruby-identifier">options</span>[<span class="ruby-value">:port</span>] <span class="ruby-operator">||</span> <span class="ruby-value">22</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000056'>
- <a name='M000056'> </a>
+ <div class='method public-instance' id='method-method-i-session'>
+ <a name='method-i-session'></a>
<div class='synopsis'>
<span class='name'>session</span>
<span class='arguments'>(require_session=false)</span>
</div>
<div class='description'>
- <p>
- Returns the <a href="../../SSH.html">Net::SSH</a> session object for this
- server. If <tt>require_session</tt> is false and the session has not
- previously been created, this will return <tt>nil</tt>. If
- <tt>require_session</tt> is true, the session will be instantiated if it
- has not already been instantiated, via the <tt>gateway</tt> if one is
- given, or directly (via Net::SSH::start) otherwise.
- </p>
+
+ <p>Returns the <a href="../../SSH.html">Net::SSH</a> session object for this
+ server. If <code>require_session</code> is false and the session has not
+ previously been created, this will return <code>nil</code>. If
+ <code>require_session</code> is true, the session will be instantiated if
+ it has not already been instantiated, via the <code>gateway</code> if one
+ is given, or directly (via Net::SSH::start) otherwise.</p>
+
<pre>if server.session.nil?&#x000A; puts &quot;connecting...&quot;&#x000A; server.session(true)&#x000A;end</pre>
- <p>
- Note that the sessions returned by this are &#8220;enhanced&#8221;
- slightly, to make them easier to deal with in a multi-session environment:
- they have a :server property automatically set on them, that refers to this
- object (the <a href="Server.html">Server</a> instance that spawned them).
- </p>
+
+ <p>Note that the sessions returned by this are "enhanced" slightly, to make
+ them easier to deal with in a multi-session environment: they have a
+ :server property automatically set on them, that refers to this object (the
+ <a href="Server.html">Server</a> instance that spawned them).</p>
+
<pre>assert_equal server, server.session[:server]</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000056-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-session-source'); return false">
[show source]
</a>
- <pre id='M000056-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 136</span>&#x000A;136: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">session</span>(<span class="ruby-identifier">require_session</span>=<span class="ruby-keyword kw">false</span>)&#x000A;137: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@session</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@session</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">require_session</span>&#x000A;138: <span class="ruby-ivar">@session</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">master</span>.<span class="ruby-identifier">next_session</span>(<span class="ruby-keyword kw">self</span>)&#x000A;139: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-session-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 136</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">session</span>(<span class="ruby-identifier">require_session</span>=<span class="ruby-keyword">false</span>)&#x000A; <span class="ruby-keyword">return</span> <span class="ruby-ivar">@session</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@session</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">require_session</span>&#x000A; <span class="ruby-ivar">@session</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">master</span>.<span class="ruby-identifier">next_session</span>(<span class="ruby-keyword">self</span>)&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000052'>
- <a name='M000052'> </a>
+ <div class='method public-instance' id='method-method-i-to_s'>
+ <a name='method-i-to_s'></a>
<div class='synopsis'>
<span class='name'>to_s</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns a human-readable representation of this server instance.
- </p>
+
+ <p>Returns a human-readable representation of this server instance.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000052-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-to_s-source'); return false">
[show source]
</a>
- <pre id='M000052-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server.rb, line 94</span>&#x000A; 94: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>&#x000A; 95: <span class="ruby-ivar">@to_s</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">begin</span>&#x000A; 96: <span class="ruby-identifier">s</span> = <span class="ruby-node">&quot;#{user}@#{host}&quot;</span>&#x000A; 97: <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;:#{options[:port]}&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:port</span>]&#x000A; 98: <span class="ruby-identifier">s</span>&#x000A; 99: <span class="ruby-keyword kw">end</span>&#x000A;100: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-to_s-source'><span class="ruby-comment"># File lib/net/ssh/multi/server.rb, line 94</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>&#x000A; <span class="ruby-ivar">@to_s</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>&#x000A; <span class="ruby-identifier">s</span> = <span class="ruby-node">&quot;#{user}@#{host}&quot;</span>&#x000A; <span class="ruby-identifier">s</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;:#{options[:port]}&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:port</span>]&#x000A; <span class="ruby-identifier">s</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -432,7 +421,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/ServerList.html b/classes/Net/SSH/Multi/ServerList.html
index 5c29cac..d1952f9 100644
--- a/classes/Net/SSH/Multi/ServerList.html
+++ b/classes/Net/SSH/Multi/ServerList.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::ServerList [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::ServerList</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,45 +26,43 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::ServerList
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Object</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- Encapsulates a list of server objects, both dynamic (<a
+
+ <p>Encapsulates a list of server objects, both dynamic (<a
href="DynamicServer.html">Net::SSH::Multi::DynamicServer</a>) and static
(<a href="Server.html">Net::SSH::Multi::Server</a>). It attempts to make it
transparent whether a dynamic server set has been evaluated or not. Note
that a <a href="ServerList.html">ServerList</a> is NOT an Array, though it
- is Enumerable.
- </p>
+ is Enumerable.</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
<ol>
- <li><a href="#M000059">new</a></li>
+ <li><a target="docwin" href="#method-c-new">new</a></li>
</ol>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000060">add</a></li>
- <li><a href="#M000061">concat</a></li>
- <li><a href="#M000062">each</a></li>
- <li><a href="#M000064">flatten</a></li>
- <li><a href="#M000063">select</a></li>
- <li><a href="#M000065">to_ary</a></li>
+ <li><a target="docwin" href="#method-i-add">add</a></li>
+ <li><a target="docwin" href="#method-i-concat">concat</a></li>
+ <li><a target="docwin" href="#method-i-each">each</a></li>
+ <li><a target="docwin" href="#method-i-flatten">flatten</a></li>
+ <li><a target="docwin" href="#method-i-select">select</a></li>
</ol>
</div>
<div id='context'>
@@ -76,139 +74,133 @@
</div>
</div>
<div id='section'>
+ <div id='aliases-list'>
+ <h2>Public Instance Aliases</h2>
+ <div class='name-list'>
+ <table summary='Public Instance Aliases'>
+ <tr class='top-aligned-row context-row'>
+ <td class='context-item-name'>to_ary</td>
+ <td>-&gt;</td>
+ <td class='context-item-value'><a target="docwin" href="#method-i-flatten">flatten</a></td>
+ </tr>
+ </table>
+ </div>
+ </div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000059'>
- <a name='M000059'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-new'>
+ <a name='method-c-new'></a>
<div class='synopsis'>
<span class='name'>new</span>
<span class='arguments'>(list=[])</span>
</div>
<div class='description'>
- <p>
- Create a new <a href="ServerList.html">ServerList</a> that wraps the given
- server list. Duplicate entries will be discarded.
- </p>
+
+ <p>Create a new <a href="ServerList.html">ServerList</a> that wraps the given
+ server list. Duplicate entries will be discarded.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000059-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-new-source'); return false">
[show source]
</a>
- <pre id='M000059-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server_list.rb, line 15</span>&#x000A;15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">list</span>=[])&#x000A;16: <span class="ruby-ivar">@list</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">uniq</span>&#x000A;17: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-new-source'><span class="ruby-comment"># File lib/net/ssh/multi/server_list.rb, line 15</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">list</span>=[])&#x000A; <span class="ruby-ivar">@list</span> = <span class="ruby-identifier">list</span>.<span class="ruby-identifier">uniq</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000060'>
- <a name='M000060'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-add'>
+ <a name='method-i-add'></a>
<div class='synopsis'>
<span class='name'>add</span>
<span class='arguments'>(server)</span>
</div>
<div class='description'>
- <p>
- Adds the given server to the list, and returns the argument. If an
+
+ <p>Adds the given server to the list, and returns the argument. If an
identical server definition already exists in the collection, the argument
- is <em>not</em> added, and the existing server record is returned instead.
- </p>
+ is <em>not</em> added, and the existing server record is returned instead.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000060-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-add-source'); return false">
[show source]
</a>
- <pre id='M000060-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server_list.rb, line 23</span>&#x000A;23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">server</span>)&#x000A;24: <span class="ruby-identifier">index</span> = <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">server</span>)&#x000A;25: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">index</span>&#x000A;26: <span class="ruby-identifier">server</span> = <span class="ruby-ivar">@list</span>[<span class="ruby-identifier">index</span>]&#x000A;27: <span class="ruby-keyword kw">else</span>&#x000A;28: <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">server</span>)&#x000A;29: <span class="ruby-keyword kw">end</span>&#x000A;30: <span class="ruby-identifier">server</span>&#x000A;31: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-add-source'><span class="ruby-comment"># File lib/net/ssh/multi/server_list.rb, line 23</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">server</span>)&#x000A; <span class="ruby-identifier">index</span> = <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">server</span>)&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">index</span>&#x000A; <span class="ruby-identifier">server</span> = <span class="ruby-ivar">@list</span>[<span class="ruby-identifier">index</span>]&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">server</span>)&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-identifier">server</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000061'>
- <a name='M000061'> </a>
+ <div class='method public-instance' id='method-method-i-concat'>
+ <a name='method-i-concat'></a>
<div class='synopsis'>
<span class='name'>concat</span>
<span class='arguments'>(servers)</span>
</div>
<div class='description'>
- <p>
- Adds an array (or otherwise Enumerable list) of servers to this list, by
- calling <a href="ServerList.html#M000060">add</a> for each argument.
- Returns <tt>self</tt>.
- </p>
+
+ <p>Adds an array (or otherwise Enumerable list) of servers to this list, by
+ calling <a href="ServerList.html#method-i-add">add</a> for each argument.
+ Returns <code>self</code>.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000061-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-concat-source'); return false">
[show source]
</a>
- <pre id='M000061-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server_list.rb, line 35</span>&#x000A;35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">concat</span>(<span class="ruby-identifier">servers</span>)&#x000A;36: <span class="ruby-identifier">servers</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">server</span>) }&#x000A;37: <span class="ruby-keyword kw">self</span>&#x000A;38: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-concat-source'><span class="ruby-comment"># File lib/net/ssh/multi/server_list.rb, line 35</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">concat</span>(<span class="ruby-identifier">servers</span>)&#x000A; <span class="ruby-identifier">servers</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">server</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000062'>
- <a name='M000062'> </a>
+ <div class='method public-instance' id='method-method-i-each'>
+ <a name='method-i-each'></a>
<div class='synopsis'>
<span class='name'>each</span>
- <span class='arguments'>() {|server| ...}</span>
+ <span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Iterates over each distinct server record in the collection. This will
+
+ <p>Iterates over each distinct server record in the collection. This will
correctly iterate over server records instantiated by a <a
href="DynamicServer.html">DynamicServer</a> as well, but only if the
- dynamic server has been &#8220;evaluated&#8221; (see <a
- href="DynamicServer.html#M000034">Net::SSH::Multi::DynamicServer#evaluate!</a>).
- </p>
+ dynamic server has been "evaluated" (see <a
+ href="DynamicServer.html#method-i-evaluate-21">Net::SSH::Multi::DynamicServer#evaluate!</a>).</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000062-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-each-source'); return false">
[show source]
</a>
- <pre id='M000062-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server_list.rb, line 44</span>&#x000A;44: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>&#x000A;45: <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A;46: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">server</span>&#x000A;47: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Server</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">server</span>&#x000A;48: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DynamicServer</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">item</span> }&#x000A;49: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;server list contains non-server: #{server.class}&quot;</span>&#x000A;50: <span class="ruby-keyword kw">end</span>&#x000A;51: <span class="ruby-keyword kw">end</span>&#x000A;52: <span class="ruby-keyword kw">self</span>&#x000A;53: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-each-source'><span class="ruby-comment"># File lib/net/ssh/multi/server_list.rb, line 44</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">each</span>&#x000A; <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-keyword">case</span> <span class="ruby-identifier">server</span>&#x000A; <span class="ruby-keyword">when</span> <span class="ruby-constant">Server</span> <span class="ruby-keyword">then</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">server</span>&#x000A; <span class="ruby-keyword">when</span> <span class="ruby-constant">DynamicServer</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">item</span> }&#x000A; <span class="ruby-keyword">else</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;server list contains non-server: #{server.class}&quot;</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000064'>
- <a name='M000064'> </a>
+ <div class='method public-instance' id='method-method-i-flatten'>
+ <a name='method-i-flatten'></a>
<div class='synopsis'>
<span class='name'>flatten</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns an array of all servers in the list, with dynamic server records
+
+ <p>Returns an array of all servers in the list, with dynamic server records
expanded. The result is an array of distinct server records (duplicates are
- removed from the result).
- </p>
+ removed from the result).</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000064-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-flatten-source'); return false">
[show source]
</a>
- <pre id='M000064-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server_list.rb, line 65</span>&#x000A;65: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">flatten</span>&#x000A;66: <span class="ruby-identifier">result</span> = <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">inject</span>([]) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aggregator</span>, <span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A;67: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">server</span>&#x000A;68: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Server</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">aggregator</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">server</span>)&#x000A;69: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">DynamicServer</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">aggregator</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">server</span>)&#x000A;70: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;server list contains non-server: #{server.class}&quot;</span>&#x000A;71: <span class="ruby-keyword kw">end</span>&#x000A;72: <span class="ruby-keyword kw">end</span>&#x000A;73: &#x000A;74: <span class="ruby-identifier">result</span>.<span class="ruby-identifier">uniq</span>&#x000A;75: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-flatten-source'><span class="ruby-comment"># File lib/net/ssh/multi/server_list.rb, line 65</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">flatten</span>&#x000A; <span class="ruby-identifier">result</span> = <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">inject</span>([]) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aggregator</span>, <span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-keyword">case</span> <span class="ruby-identifier">server</span>&#x000A; <span class="ruby-keyword">when</span> <span class="ruby-constant">Server</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">aggregator</span>.<span class="ruby-identifier">push</span>(<span class="ruby-identifier">server</span>)&#x000A; <span class="ruby-keyword">when</span> <span class="ruby-constant">DynamicServer</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">aggregator</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">server</span>)&#x000A; <span class="ruby-keyword">else</span> <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;server list contains non-server: #{server.class}&quot;</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-identifier">result</span>.<span class="ruby-identifier">uniq</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000063'>
- <a name='M000063'> </a>
+ <div class='method public-instance' id='method-method-i-select'>
+ <a name='method-i-select'></a>
<div class='synopsis'>
<span class='name'>select</span>
- <span class='arguments'>() {|i| ...}</span>
+ <span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Works exactly as Enumerable#select, but returns the result as a new <a
- href="ServerList.html">ServerList</a> instance.
- </p>
+
+ <p>Works exactly as Enumerable#select, but returns the result as a new <a
+ href="ServerList.html">ServerList</a> instance.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000063-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-select-source'); return false">
[show source]
</a>
- <pre id='M000063-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/server_list.rb, line 57</span>&#x000A;57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">select</span>&#x000A;58: <span class="ruby-identifier">subset</span> = <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">i</span> }&#x000A;59: <span class="ruby-constant">ServerList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">subset</span>)&#x000A;60: <span class="ruby-keyword kw">end</span></pre>
- </div>
- </div>
- <div class='method public-instance' id='method-M000065'>
- <a name='M000065'> </a>
- <div class='synopsis'>
- <span class='name'>to_ary</span>
- <span class='arguments'>()</span>
- </div>
- <div class='description'>
- <p>
- Alias for <a href="ServerList.html#M000064">flatten</a>
- </p>
+ <pre id='method-i-select-source'><span class="ruby-comment"># File lib/net/ssh/multi/server_list.rb, line 57</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">select</span>&#x000A; <span class="ruby-identifier">subset</span> = <span class="ruby-ivar">@list</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span> <span class="ruby-keyword">yield</span> <span class="ruby-identifier">i</span> }&#x000A; <span class="ruby-constant">ServerList</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">subset</span>)&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -218,7 +210,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/Session.html b/classes/Net/SSH/Multi/Session.html
index e0ba392..7c24957 100644
--- a/classes/Net/SSH/Multi/Session.html
+++ b/classes/Net/SSH/Multi/Session.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::Session [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::Session</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,525 +26,540 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::Session
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Object</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- Represents a collection of connections to various servers. It provides an
+
+ <p>Represents a collection of connections to various servers. It provides an
interface for organizing the connections (<a
- href="Session.html#M000067">group</a>), as well as a way to scope commands
- to a subset of all connections (<a href="Session.html#M000072">with</a>).
- You can also provide a default gateway connection that servers should use
- when connecting (<a href="Session.html#M000068">via</a>). It exposes an
- interface similar to Net::SSH::Connection::Session for opening <a
+ href="Session.html#method-i-group">group</a>), as well as a way to scope
+ commands to a subset of all connections (<a
+ href="Session.html#method-i-with">with</a>). You can also provide a default
+ gateway connection that servers should use when connecting (<a
+ href="Session.html#method-i-via">via</a>). It exposes an interface similar
+ to Net::SSH::Connection::Session for opening <a
href="../../SSH.html">SSH</a> channels and executing commands, allowing for
- these operations to be done in parallel across multiple connections.
- </p>
- <pre>Net::SSH::Multi.start do |session|&#x000A; # access servers via a gateway&#x000A; session.via 'gateway', 'gateway-user'&#x000A;&#x000A; # define the servers we want to use&#x000A; session.use 'user1@host1'&#x000A; session.use 'user2@host2'&#x000A;&#x000A; # define servers in groups for more granular access&#x000A; session.group :app do&#x000A; session.use 'user@app1'&#x000A; session.use 'user@app2'&#x000A; end&#x000A;&#x000A; # execute commands on all servers&#x000A; session.exec &quot;uptime&quot;&#x000A;&#x000A; # execute commands on a subset of servers&#x000A; session.with(:app).exec &quot;hostname&quot;&#x000A;&#x000A; # run the aggregated event loop&#x000A; session.loop&#x000A;end</pre>
- <p>
- Note that connections are established lazily, as soon as they are needed.
+ these operations to be done in parallel across multiple connections.</p>
+
+ <pre class="ruby"><span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">session</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># access servers via a gateway</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">via</span> <span class="ruby-string">'gateway'</span>, <span class="ruby-string">'gateway-user'</span>&#x000A;&#x000A; <span class="ruby-comment"># define the servers we want to use</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user1@host1'</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user2@host2'</span>&#x000A;&#x000A; <span class="ruby-comment"># define servers in groups for more granular access</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">group</span> :<span class="ruby-identifier">app</span> <span class="ruby-keyword">do</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user@app1'</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user@app2'</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-comment"># execute commands on all servers</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">exec</span> <span class="ruby-string">&quot;uptime&quot;</span>&#x000A;&#x000A; <span class="ruby-comment"># execute commands on a subset of servers</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">with</span>(:<span class="ruby-identifier">app</span>).<span class="ruby-identifier">exec</span> <span class="ruby-string">&quot;hostname&quot;</span>&#x000A;&#x000A; <span class="ruby-comment"># run the aggregated event loop</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">loop</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>Note that connections are established lazily, as soon as they are needed.
You can force the connections to be opened immediately, though, using the
- connect! method.
- </p>
- <h2>Concurrent Connection Limiting</h2>
- <p>
- Sometimes you may be dealing with a large number of servers, and if you try
- to have connections open to all of them simultaneously you&#8217;ll run
- into open file handle limitations and such. If this happens to you, you can
- set the concurrent_connections property of the session. <a
- href="../Multi.html">Net::SSH::Multi</a> will then ensure that no more than
- this number of connections are ever open simultaneously.
- </p>
- <pre>Net::SSH::Multi.start(:concurrent_connections =&gt; 5) do |session|&#x000A; # ...&#x000A;end</pre>
- <p>
- Opening channels and executing commands will still work exactly as before,
+ <a href="SessionActions.html#method-i-connect-21">connect!</a> method.</p>
+
+ <h2 id="label-Concurrent+Connection+Limiting">Concurrent Connection Limiting</h2>
+
+ <p>Sometimes you may be dealing with a large number of servers, and if you try
+ to have connections open to all of them simultaneously you'll run into open
+ file handle limitations and such. If this happens to you, you can set the
+ <a
+ href="Session.html#attribute-i-concurrent_connections">concurrent_connections</a>
+ property of the session. <a href="../Multi.html">Net::SSH::Multi</a> will
+ then ensure that no more than this number of connections are ever open
+ simultaneously.</p>
+
+ <pre class="ruby"><span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span>(:<span class="ruby-identifier">concurrent_connections</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">5</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">session</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>Opening channels and executing commands will still work exactly as before,
but <a href="../Multi.html">Net::SSH::Multi</a> will transparently close
- finished connections and open pending ones.
- </p>
- <h2>Controlling Connection Errors</h2>
- <p>
- By default, <a href="../Multi.html">Net::SSH::Multi</a> will raise an
+ finished connections and open pending ones.</p>
+
+ <h2 id="label-Controlling+Connection+Errors">Controlling Connection Errors</h2>
+
+ <p>By default, <a href="../Multi.html">Net::SSH::Multi</a> will raise an
exception if a connection error occurs when connecting to a server. This
will typically bubble up and abort the entire connection process.
Sometimes, however, you might wish to ignore connection errors, for
instance when starting a daemon on a large number of boxes and you know
- that some of the boxes are going to be unavailable.
- </p>
- <p>
- To do this, simply set the on_error property of the session to :ignore (or
- to :warn, if you want a warning message when a connection attempt fails):
- </p>
- <pre>Net::SSH::Multi.start(:on_error =&gt; :ignore) do |session|&#x000A; # ...&#x000A;end</pre>
- <p>
- The default is :fail, which causes the exception to bubble up.
- Additionally, you can specify a Proc object as the value for on_error,
- which will be invoked with the server in question if the connection attempt
- fails. You can force the connection attempt to retry by throwing the :go
- symbol, with :retry as the payload, or force the exception to be reraised
- by throwing :go with :raise as the payload:
- </p>
- <pre>handler = Proc.new do |server|&#x000A; server[:connection_attempts] ||= 0&#x000A; if server[:connection_attempts] &lt; 3&#x000A; server[:connection_attempts] += 1&#x000A; throw :go, :retry&#x000A; else&#x000A; throw :go, :raise&#x000A; end&#x000A;end&#x000A;&#x000A;Net::SSH::Multi.start(:on_error =&gt; handler) do |session|&#x000A; # ...&#x000A;end</pre>
- <p>
- Any other thrown value (or no thrown value at all) will result in the
- failure being ignored.
- </p>
- <h2>Lazily Evaluated <a href="Server.html">Server</a> Definitions</h2>
- <p>
- Sometimes you might be dealing with an environment where you don&#8217;t
- know the names or addresses of the servers until runtime. You can certainly
+ that some of the boxes are going to be unavailable.</p>
+
+ <p>To do this, simply set the <a
+ href="Session.html#attribute-i-on_error">on_error</a> property of the
+ session to :ignore (or to :warn, if you want a warning message when a
+ connection attempt fails):</p>
+
+ <pre class="ruby"><span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span>(:<span class="ruby-identifier">on_error</span> =<span class="ruby-operator">&gt;</span> :<span class="ruby-identifier">ignore</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">session</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>The default is :fail, which causes the exception to bubble up.
+ Additionally, you can specify a Proc object as the value for <a
+ href="Session.html#attribute-i-on_error">on_error</a>, which will be
+ invoked with the server in question if the connection attempt fails. You
+ can force the connection attempt to retry by throwing the :go symbol, with
+ :retry as the payload, or force the exception to be reraised by throwing
+ :go with :raise as the payload:</p>
+
+ <pre class="ruby"><span class="ruby-identifier">handler</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">server</span>[:<span class="ruby-identifier">connection_attempts</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">server</span>[:<span class="ruby-identifier">connection_attempts</span>] <span class="ruby-operator">&lt;</span> <span class="ruby-value">3</span>&#x000A; <span class="ruby-identifier">server</span>[:<span class="ruby-identifier">connection_attempts</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>&#x000A; <span class="ruby-identifier">throw</span> :<span class="ruby-identifier">go</span>, :<span class="ruby-keyword">retry</span>&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-identifier">throw</span> :<span class="ruby-identifier">go</span>, :<span class="ruby-identifier">raise</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span>&#x000A;&#x000A;<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span>(:<span class="ruby-identifier">on_error</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">handler</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">session</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># ...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>Any other thrown value (or no thrown value at all) will result in the
+ failure being ignored.</p>
+
+ <h2 id="label-Lazily+Evaluated+Server+Definitions">Lazily Evaluated <a href="Server.html">Server</a> Definitions</h2>
+
+ <p>Sometimes you might be dealing with an environment where you don't know the
+ names or addresses of the servers until runtime. You can certainly
dynamically build server names and pass them to <a
- href="Session.html#M000069">use</a>, but if the operation to determine the
- server names is expensive, you might want to defer it until the server is
- actually needed (especially if the logic of your program is such that you
- might not even need to connect to that server every time the program runs).
- </p>
- <p>
- You can do this by passing a block to <a
- href="Session.html#M000069">use</a>:
- </p>
- <pre>session.use do |opt|&#x000A; lookup_ip_address_of_remote_host&#x000A;end</pre>
- <p>
- See <a href="Session.html#M000069">use</a> for more information about this
- usage.
- </p>
+ href="Session.html#method-i-use">use</a>, but if the operation to determine
+ the server names is expensive, you might want to defer it until the server
+ is actually needed (especially if the logic of your program is such that
+ you might not even need to connect to that server every time the program
+ runs).</p>
+
+ <p>You can do this by passing a block to <a
+ href="Session.html#method-i-use">use</a>:</p>
+
+ <pre class="ruby"><span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">opt</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">lookup_ip_address_of_remote_host</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>See <a href="Session.html#method-i-use">use</a> for more information about
+ this usage.</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
<ol>
- <li><a href="#M000066">new</a></li>
+ <li><a target="docwin" href="#method-c-new">new</a></li>
</ol>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000074">close</a></li>
- <li><a href="#M000067">group</a></li>
- <li><a href="#M000075">loop</a></li>
- <li><a href="#M000076">loop_forever</a></li>
- <li><a href="#M000073">on</a></li>
- <li><a href="#M000077">process</a></li>
- <li><a href="#M000070">servers</a></li>
- <li><a href="#M000071">servers_for</a></li>
- <li><a href="#M000069">use</a></li>
- <li><a href="#M000068">via</a></li>
- <li><a href="#M000072">with</a></li>
+ <li><a target="docwin" href="#method-i-close">close</a></li>
+ <li><a target="docwin" href="#attribute-i-concurrent_connections">concurrent_connections</a></li>
+ <li><a target="docwin" href="#attribute-i-default_gateway">default_gateway</a></li>
+ <li><a target="docwin" href="#attribute-i-default_user">default_user</a></li>
+ <li><a target="docwin" href="#method-i-group">group</a></li>
+ <li><a target="docwin" href="#attribute-i-groups">groups</a></li>
+ <li><a target="docwin" href="#method-i-loop">loop</a></li>
+ <li><a target="docwin" href="#method-i-on">on</a></li>
+ <li><a target="docwin" href="#attribute-i-on_error">on_error</a></li>
+ <li><a target="docwin" href="#method-i-process">process</a></li>
+ <li><a target="docwin" href="#attribute-i-server_list">server_list</a></li>
+ <li><a target="docwin" href="#method-i-servers">servers</a></li>
+ <li><a target="docwin" href="#method-i-servers_for">servers_for</a></li>
+ <li><a target="docwin" href="#method-i-use">use</a></li>
+ <li><a target="docwin" href="#method-i-via">via</a></li>
+ <li><a target="docwin" href="#method-i-with">with</a></li>
</ol>
</div>
<div id='context'>
<div id='includes'>
<h2>Included modules</h2>
<ol>
- <li><a href="SessionActions.html">SessionActions</a></li>
+ <li><a target="docwin" href="SessionActions.html">SessionActions</a></li>
</ol>
</div>
</div>
<div id='section'>
+ <div id='aliases-list'>
+ <h2>Public Instance Aliases</h2>
+ <div class='name-list'>
+ <table summary='Public Instance Aliases'>
+ <tr class='top-aligned-row context-row'>
+ <td class='context-item-name'>loop_forever</td>
+ <td>-&gt;</td>
+ <td class='context-item-value'><a target="docwin" href="#method-i-loop">loop</a></td>
+ </tr>
+ </table>
+ </div>
+ </div>
<div id='attribute-list'>
<h2 class='section-bar'>Attributes</h2>
<div class='name-list'>
<table>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>concurrent_connections</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-concurrent_connections'>concurrent_connections</a>
+ </td>
<td class='context-item-value'>[RW]</td>
<td class='context-item-desc'>
- The number of allowed concurrent connections. No more than this number of
- sessions will be open at any given time.
+ <p>The number of allowed concurrent connections. No more than this number of
+ sessions will be open at any given time.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>default_gateway</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-default_gateway'>default_gateway</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The default Net::SSH::Gateway instance to use to connect to the servers. If
- <tt>nil</tt>, no default gateway will be used.
+ <p>The default Net::SSH::Gateway instance to use to connect to the servers. If
+ <code>nil</code>, no default gateway will be used.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>default_user</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-default_user'>default_user</a>
+ </td>
<td class='context-item-value'>[RW]</td>
<td class='context-item-desc'>
- The default user name to use when connecting to a server. If a user name is
+ <p>The default user name to use when connecting to a server. If a user name is
not given for a particular server, this value will be used. It defaults to
- ENV[&#8216;USER&#8217;] || ENV[&#8216;USERNAME&#8217;], or
- &#8220;unknown&#8221; if neither of those are set.
+ <a target="_top" href="http://'USER'">ENV</a> || <a target="_top" href="http://'USERNAME'">ENV</a>, or
+ "unknown" if neither of those are set.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>groups</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-groups'>groups</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The hash of group definitions, mapping each group name to a corresponding
- <a href="ServerList.html">Net::SSH::Multi::ServerList</a>.
+ <p>The hash of group definitions, mapping each group name to a corresponding
+ <a href="ServerList.html">Net::SSH::Multi::ServerList</a>.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>on_error</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-on_error'>on_error</a>
+ </td>
<td class='context-item-value'>[RW]</td>
<td class='context-item-desc'>
- How connection errors should be handled. This defaults to :fail, but may be
+ <p>How connection errors should be handled. This defaults to :fail, but may be
set to :ignore if connection errors should be ignored, or :warn if
- connection errors should cause a warning.
+ connection errors should cause a warning.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>server_list</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-server_list'>server_list</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The <a href="ServerList.html">Net::SSH::Multi::ServerList</a> managed by
- this session.
+ <p>The <a href="ServerList.html">Net::SSH::Multi::ServerList</a> managed by
+ this session.</p>
</td>
</tr>
</table>
</div>
</div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000066'>
- <a name='M000066'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-new'>
+ <a name='method-c-new'></a>
<div class='synopsis'>
<span class='name'>new</span>
<span class='arguments'>(options={})</span>
</div>
<div class='description'>
- <p>
- Creates a new <a href="Session.html">Net::SSH::Multi::Session</a> instance.
+
+ <p>Creates a new <a href="Session.html">Net::SSH::Multi::Session</a> instance.
Initially, it contains no server definitions, no group definitions, and no
- default gateway.
- </p>
- <p>
- You can set the concurrent_connections property in the options. Setting it
- to <tt>nil</tt> (the default) will cause <a
- href="../Multi.html">Net::SSH::Multi</a> to ignore any concurrent
+ default gateway.</p>
+
+ <p>You can set the <a
+ href="Session.html#attribute-i-concurrent_connections">concurrent_connections</a>
+ property in the options. Setting it to <code>nil</code> (the default) will
+ cause <a href="../Multi.html">Net::SSH::Multi</a> to ignore any concurrent
connection limit and allow all defined sessions to be open simultaneously.
Setting it to an integer will cause <a
href="../Multi.html">Net::SSH::Multi</a> to allow no more than that number
of concurrently open sessions, opening subsequent sessions only when other
- sessions finish and close.
- </p>
- <pre>Net::SSH::Multi.start(:concurrent_connections =&gt; 10) do |session|&#x000A; session.use ...&#x000A;end</pre>
+ sessions finish and close.</p>
+
+ <pre class="ruby"><span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span>(:<span class="ruby-identifier">concurrent_connections</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">10</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">session</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-operator">...</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000066-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-new-source'); return false">
[show source]
</a>
- <pre id='M000066-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 171</span>&#x000A;171: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})&#x000A;172: <span class="ruby-ivar">@server_list</span> = <span class="ruby-constant">ServerList</span>.<span class="ruby-identifier">new</span>&#x000A;173: <span class="ruby-ivar">@groups</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-constant">ServerList</span>.<span class="ruby-identifier">new</span> }&#x000A;174: <span class="ruby-ivar">@gateway</span> = <span class="ruby-keyword kw">nil</span>&#x000A;175: <span class="ruby-ivar">@open_groups</span> = []&#x000A;176: <span class="ruby-ivar">@connect_threads</span> = []&#x000A;177: <span class="ruby-ivar">@on_error</span> = <span class="ruby-identifier">:fail</span>&#x000A;178: <span class="ruby-ivar">@default_user</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'USER'</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'USERNAME'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;unknown&quot;</span>&#x000A;179: &#x000A;180: <span class="ruby-ivar">@open_connections</span> = <span class="ruby-value">0</span>&#x000A;181: <span class="ruby-ivar">@pending_sessions</span> = []&#x000A;182: <span class="ruby-ivar">@session_mutex</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>&#x000A;183: &#x000A;184: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">opt</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{opt}=&quot;</span>, <span class="ruby-identifier">value</span>) }&#x000A;185: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-new-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 171</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})&#x000A; <span class="ruby-ivar">@server_list</span> = <span class="ruby-constant">ServerList</span>.<span class="ruby-identifier">new</span>&#x000A; <span class="ruby-ivar">@groups</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-constant">ServerList</span>.<span class="ruby-identifier">new</span> }&#x000A; <span class="ruby-ivar">@gateway</span> = <span class="ruby-keyword">nil</span>&#x000A; <span class="ruby-ivar">@open_groups</span> = []&#x000A; <span class="ruby-ivar">@connect_threads</span> = []&#x000A; <span class="ruby-ivar">@on_error</span> = <span class="ruby-value">:fail</span>&#x000A; <span class="ruby-ivar">@default_user</span> = <span class="ruby-constant">ENV</span>[<span class="ruby-string">'USER'</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">ENV</span>[<span class="ruby-string">'USERNAME'</span>] <span class="ruby-operator">||</span> <span class="ruby-string">&quot;unknown&quot;</span>&#x000A;&#x000A; <span class="ruby-ivar">@open_connections</span> = <span class="ruby-value">0</span>&#x000A; <span class="ruby-ivar">@pending_sessions</span> = []&#x000A; <span class="ruby-ivar">@session_mutex</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>&#x000A;&#x000A; <span class="ruby-identifier">options</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">opt</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">send</span>(<span class="ruby-node">&quot;#{opt}=&quot;</span>, <span class="ruby-identifier">value</span>) }&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000074'>
- <a name='M000074'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-close'>
+ <a name='method-i-close'></a>
<div class='synopsis'>
<span class='name'>close</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Closes the multi-session by shutting down all open server sessions, and the
+
+ <p>Closes the multi-session by shutting down all open server sessions, and the
default gateway (if one was specified using <a
- href="Session.html#M000068">via</a>). Note that other gateway connections
- (e.g., those passed to <a href="Session.html#M000069">use</a> directly)
- will <em>not</em> be closed by this method, and must be managed externally.
- </p>
+ href="Session.html#method-i-via">via</a>). Note that other gateway
+ connections (e.g., those passed to <a
+ href="Session.html#method-i-use">use</a> directly) will <em>not</em> be
+ closed by this method, and must be managed externally.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000074-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-close-source'); return false">
[show source]
</a>
- <pre id='M000074-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 402</span>&#x000A;402: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>&#x000A;403: <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">close_channels</span> }&#x000A;404: <span class="ruby-identifier">loop</span>(<span class="ruby-value">0</span>) { <span class="ruby-identifier">busy?</span>(<span class="ruby-keyword kw">true</span>) }&#x000A;405: <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">close</span> }&#x000A;406: <span class="ruby-identifier">default_gateway</span>.<span class="ruby-identifier">shutdown!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">default_gateway</span>&#x000A;407: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-close-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 402</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">close</span>&#x000A; <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">close_channels</span> }&#x000A; <span class="ruby-identifier">loop</span>(<span class="ruby-value">0</span>) { <span class="ruby-identifier">busy?</span>(<span class="ruby-keyword">true</span>) }&#x000A; <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">close</span> }&#x000A; <span class="ruby-identifier">default_gateway</span>.<span class="ruby-identifier">shutdown!</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">default_gateway</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000067'>
- <a name='M000067'> </a>
+ <div class='method public-instance' id='method-method-i-group'>
+ <a name='method-i-group'></a>
<div class='synopsis'>
<span class='name'>group</span>
- <span class='arguments'>(*args) {|self| ...}</span>
+ <span class='arguments'>(*args)</span>
</div>
<div class='description'>
- <p>
- At its simplest, this associates a named group with a server definition. It
- can be used in either of two ways:
- </p>
- <p>
- First, you can use it to associate a group (or array of groups) with a
+
+ <p>At its simplest, this associates a named group with a server definition. It
+ can be used in either of two ways:</p>
+
+ <p>First, you can use it to associate a group (or array of groups) with a
server definition (or array of server definitions). The server definitions
- must already exist in the server_list array (typically by calling <a
- href="Session.html#M000069">use</a>):
- </p>
- <pre>server1 = session.use('host1', 'user1')&#x000A;server2 = session.use('host2', 'user2')&#x000A;session.group :app =&gt; server1, :web =&gt; server2&#x000A;session.group :staging =&gt; [server1, server2]&#x000A;session.group %w(xen linux) =&gt; server2&#x000A;session.group %w(rackspace backup) =&gt; [server1, server2]</pre>
- <p>
- Secondly, instead of a mapping of groups to servers, you can just provide a
+ must already exist in the <a
+ href="Session.html#attribute-i-server_list">server_list</a> array
+ (typically by calling <a href="Session.html#method-i-use">use</a>):</p>
+
+ <pre class="ruby"><span class="ruby-identifier">server1</span> = <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span>(<span class="ruby-string">'host1'</span>, <span class="ruby-string">'user1'</span>)&#x000A;<span class="ruby-identifier">server2</span> = <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span>(<span class="ruby-string">'host2'</span>, <span class="ruby-string">'user2'</span>)&#x000A;<span class="ruby-identifier">session</span>.<span class="ruby-identifier">group</span> :<span class="ruby-identifier">app</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">server1</span>, :<span class="ruby-identifier">web</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">server2</span>&#x000A;<span class="ruby-identifier">session</span>.<span class="ruby-identifier">group</span> :<span class="ruby-identifier">staging</span> =<span class="ruby-operator">&gt;</span> [<span class="ruby-identifier">server1</span>, <span class="ruby-identifier">server2</span>]&#x000A;<span class="ruby-identifier">session</span>.<span class="ruby-identifier">group</span> <span class="ruby-node">%w(xen linux)</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">server2</span>&#x000A;<span class="ruby-identifier">session</span>.<span class="ruby-identifier">group</span> <span class="ruby-node">%w(rackspace backup)</span> =<span class="ruby-operator">&gt;</span> [<span class="ruby-identifier">server1</span>, <span class="ruby-identifier">server2</span>]</pre>
+
+ <p>Secondly, instead of a mapping of groups to servers, you can just provide a
list of group names, and then a block. Inside the block, any calls to <a
- href="Session.html#M000069">use</a> will automatically associate the new
- server definition with those groups. You can nest <a
- href="Session.html#M000067">group</a> calls, too, which will aggregate the
- group definitions.
- </p>
+ href="Session.html#method-i-use">use</a> will automatically associate the
+ new server definition with those groups. You can nest <a
+ href="Session.html#method-i-group">group</a> calls, too, which will
+ aggregate the group definitions.</p>
+
<pre>session.group :rackspace, :backup do&#x000A; session.use 'host1', 'user1'&#x000A; session.group :xen do&#x000A; session.use 'host2', 'user2'&#x000A; end&#x000A;end</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000067-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-group-source'); return false">
[show source]
</a>
- <pre id='M000067-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 213</span>&#x000A;213: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">group</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)&#x000A;214: <span class="ruby-identifier">mapping</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}&#x000A;215: &#x000A;216: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mapping</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">block_given?</span>&#x000A;217: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;must provide group mapping OR block, not both&quot;</span>&#x000A;218: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">block_given?</span>&#x000A;219: <span class="ruby-keyword kw">begin</span>&#x000A;220: <span class="ruby-identifier">saved_groups</span> = <span class="ruby-identifier">open_groups</span>.<span class="ruby-identifier">dup</span>&#x000A;221: <span class="ruby-identifier">open_groups</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">args</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_sym</span> }).<span class="ruby-identifier">uniq!</span>&#x000A;222: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">self</span>&#x000A;223: <span class="ruby-keyword kw">ensure</span>&#x000A;224: <span class="ruby-identifier">open_groups</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-identifier">saved_groups</span>)&#x000A;225: <span class="ruby-keyword kw">end</span>&#x000A;226: <span class="ruby-keyword kw">else</span>&#x000A;227: <span class="ruby-identifier">mapping</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>&#x000A;228: (<span class="ruby-identifier">open_groups</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">key</span>)).<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">grp</span><span class="ruby-operator">|</span>&#x000A;229: <span class="ruby-identifier">groups</span>[<span class="ruby-identifier">grp</span>.<span class="ruby-identifier">to_sym</span>].<span class="ruby-identifier">concat</span>(<span class="ruby-constant">Array</span>(<span class="ruby-identifier">value</span>))&#x000A;230: <span class="ruby-keyword kw">end</span>&#x000A;231: <span class="ruby-keyword kw">end</span>&#x000A;232: <span class="ruby-keyword kw">end</span>&#x000A;233: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-group-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 213</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">group</span>(*<span class="ruby-identifier">args</span>)&#x000A; <span class="ruby-identifier">mapping</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}&#x000A;&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">mapping</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">block_given?</span>&#x000A; <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-string">&quot;must provide group mapping OR block, not both&quot;</span>&#x000A; <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">block_given?</span>&#x000A; <span class="ruby-keyword">begin</span>&#x000A; <span class="ruby-identifier">saved_groups</span> = <span class="ruby-identifier">open_groups</span>.<span class="ruby-identifier">dup</span>&#x000A; <span class="ruby-identifier">open_groups</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">args</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_sym</span> }).<span class="ruby-identifier">uniq!</span>&#x000A; <span class="ruby-keyword">yield</span> <span class="ruby-keyword">self</span>&#x000A; <span class="ruby-keyword">ensure</span>&#x000A; <span class="ruby-identifier">open_groups</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-identifier">saved_groups</span>)&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-identifier">mapping</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>&#x000A; (<span class="ruby-identifier">open_groups</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">key</span>)).<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">grp</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">groups</span>[<span class="ruby-identifier">grp</span>.<span class="ruby-identifier">to_sym</span>].<span class="ruby-identifier">concat</span>(<span class="ruby-constant">Array</span>(<span class="ruby-identifier">value</span>))&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000075'>
- <a name='M000075'> </a>
+ <div class='method public-instance' id='method-method-i-loop'>
+ <a name='method-i-loop'></a>
<div class='synopsis'>
<span class='name'>loop</span>
- <span class='arguments'>(wait=nil, &amp;block)</span>
+ <span class='arguments'>(wait=nil, &block)</span>
</div>
<div class='description'>
- <p>
- Run the aggregated event loop for all open server sessions, until the given
- block returns <tt>false</tt>. If no block is given, the loop will run for
- as long as busy? returns <tt>true</tt> (in other words, for as long as
- there are any (non-invisible) channels open).
- </p>
+
+ <p>Run the aggregated event loop for all open server sessions, until the given
+ block returns <code>false</code>. If no block is given, the loop will run
+ for as long as <a href="SessionActions.html#method-i-busy-3F">busy?</a>
+ returns <code>true</code> (in other words, for as long as there are any
+ (non-invisible) channels open).</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000075-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-loop-source'); return false">
[show source]
</a>
- <pre id='M000075-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 415</span>&#x000A;415: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">loop</span>(<span class="ruby-identifier">wait</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;416: <span class="ruby-identifier">running</span> = <span class="ruby-identifier">block</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">busy?</span> }&#x000A;417: <span class="ruby-identifier">loop_forever</span> { <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">wait</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">running</span>) }&#x000A;418: <span class="ruby-keyword kw">end</span></pre>
- </div>
- </div>
- <div class='method public-instance' id='method-M000076'>
- <a name='M000076'> </a>
- <div class='synopsis'>
- <span class='name'>loop_forever</span>
- <span class='arguments'>(wait=nil, &amp;block)</span>
- </div>
- <div class='description'>
- <p>
- Alias for <a href="Session.html#M000075">loop</a>
- </p>
+ <pre id='method-i-loop-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 415</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">loop</span>(<span class="ruby-identifier">wait</span>=<span class="ruby-keyword">nil</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">running</span> = <span class="ruby-identifier">block</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">busy?</span> }&#x000A; <span class="ruby-identifier">loop_forever</span> { <span class="ruby-keyword">break</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">wait</span>, &amp;<span class="ruby-identifier">running</span>) }&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000073'>
- <a name='M000073'> </a>
+ <div class='method public-instance' id='method-method-i-on'>
+ <a name='method-i-on'></a>
<div class='synopsis'>
<span class='name'>on</span>
- <span class='arguments'>(*servers) {|subsession if block_given?| ...}</span>
+ <span class='arguments'>(*servers)</span>
</div>
<div class='description'>
- <p>
- Works as <a href="Session.html#M000072">with</a>, but for specific servers
- rather than groups. It will return a new subsession (<a
+
+ <p>Works as <a href="Session.html#method-i-with">with</a>, but for specific
+ servers rather than groups. It will return a new subsession (<a
href="Subsession.html">Net::SSH::Multi::Subsession</a>) consisting of the
given servers. (Note that it requires that the servers in question have
- been created via calls to <a href="Session.html#M000069">use</a> on this
- session object, or things will not work quite right.) If a block is given,
- the new subsession will also be yielded to the block.
- </p>
+ been created via calls to <a href="Session.html#method-i-use">use</a> on
+ this session object, or things will not work quite right.) If a block is
+ given, the new subsession will also be yielded to the block.</p>
+
<pre>srv1 = session.use('host1', 'user')&#x000A;srv2 = session.use('host2', 'user')&#x000A;# ...&#x000A;session.on(srv1, srv2).exec('hostname')</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000073-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-on-source'); return false">
[show source]
</a>
- <pre id='M000073-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 392</span>&#x000A;392: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">servers</span>)&#x000A;393: <span class="ruby-identifier">subsession</span> = <span class="ruby-constant">Subsession</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">servers</span>)&#x000A;394: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">subsession</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>&#x000A;395: <span class="ruby-identifier">subsession</span>&#x000A;396: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-on-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 392</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">on</span>(*<span class="ruby-identifier">servers</span>)&#x000A; <span class="ruby-identifier">subsession</span> = <span class="ruby-constant">Subsession</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">servers</span>)&#x000A; <span class="ruby-keyword">yield</span> <span class="ruby-identifier">subsession</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>&#x000A; <span class="ruby-identifier">subsession</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000077'>
- <a name='M000077'> </a>
+ <div class='method public-instance' id='method-method-i-process'>
+ <a name='method-i-process'></a>
<div class='synopsis'>
<span class='name'>process</span>
- <span class='arguments'>(wait=nil, &amp;block)</span>
+ <span class='arguments'>(wait=nil, &block)</span>
</div>
<div class='description'>
- <p>
- Run a single iteration of the aggregated event loop for all open server
- sessions. The <tt>wait</tt> parameter indicates how long to wait for an
- event to appear on any of the different sessions; <tt>nil</tt> (the
- default) means &#8220;wait forever&#8221;. If the block is given, then it
- will be used to determine whether <a
- href="Session.html#M000077">process</a> returns <tt>true</tt> (the block
- did not return <tt>false</tt>), or <tt>false</tt> (the block returned
- <tt>false</tt>).
- </p>
+
+ <p>Run a single iteration of the aggregated event loop for all open server
+ sessions. The <code>wait</code> parameter indicates how long to wait for an
+ event to appear on any of the different sessions; <code>nil</code> (the
+ default) means "wait forever". If the block is given, then it will be used
+ to determine whether <a href="Session.html#method-i-process">process</a>
+ returns <code>true</code> (the block did not return <code>false</code>), or
+ <code>false</code> (the block returned <code>false</code>).</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000077-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-process-source'); return false">
[show source]
</a>
- <pre id='M000077-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 426</span>&#x000A;426: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">wait</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;427: <span class="ruby-identifier">realize_pending_connections!</span>&#x000A;428: <span class="ruby-identifier">wait</span> = <span class="ruby-ivar">@connect_threads</span>.<span class="ruby-identifier">any?</span> <span class="ruby-value">? </span><span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">wait</span>&#x000A;429: &#x000A;430: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">preprocess</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;431: &#x000A;432: <span class="ruby-identifier">readers</span> = <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">readers</span> }.<span class="ruby-identifier">flatten</span>&#x000A;433: <span class="ruby-identifier">writers</span> = <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">writers</span> }.<span class="ruby-identifier">flatten</span>&#x000A;434: &#x000A;435: <span class="ruby-identifier">readers</span>, <span class="ruby-identifier">writers</span>, = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">select</span>(<span class="ruby-identifier">readers</span>, <span class="ruby-identifier">writers</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">wait</span>)&#x000A;436: &#x000A;437: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">readers</span>&#x000A;438: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">postprocess</span>(<span class="ruby-identifier">readers</span>, <span class="ruby-identifier">writers</span>)&#x000A;439: <span class="ruby-keyword kw">else</span>&#x000A;440: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>&#x000A;441: <span class="ruby-keyword kw">end</span>&#x000A;442: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-process-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 426</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">process</span>(<span class="ruby-identifier">wait</span>=<span class="ruby-keyword">nil</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">realize_pending_connections!</span>&#x000A; <span class="ruby-identifier">wait</span> = <span class="ruby-ivar">@connect_threads</span>.<span class="ruby-identifier">any?</span> <span class="ruby-operator">?</span> <span class="ruby-value">0</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">wait</span>&#x000A;&#x000A; <span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">preprocess</span>(&amp;<span class="ruby-identifier">block</span>)&#x000A;&#x000A; <span class="ruby-identifier">readers</span> = <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">readers</span> }.<span class="ruby-identifier">flatten</span>&#x000A; <span class="ruby-identifier">writers</span> = <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">writers</span> }.<span class="ruby-identifier">flatten</span>&#x000A;&#x000A; <span class="ruby-identifier">readers</span>, <span class="ruby-identifier">writers</span>, = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">select</span>(<span class="ruby-identifier">readers</span>, <span class="ruby-identifier">writers</span>, <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">wait</span>)&#x000A;&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">readers</span>&#x000A; <span class="ruby-keyword">return</span> <span class="ruby-identifier">postprocess</span>(<span class="ruby-identifier">readers</span>, <span class="ruby-identifier">writers</span>)&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000070'>
- <a name='M000070'> </a>
+ <div class='method public-instance' id='method-method-i-servers'>
+ <a name='method-i-servers'></a>
<div class='synopsis'>
<span class='name'>servers</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Essentially an alias for <a href="Session.html#M000071">servers_for</a>
- without any arguments. This is used primarily to satistfy the expectations
- of the <a href="SessionActions.html">Net::SSH::Multi::SessionActions</a>
- module.
- </p>
+
+ <p>Essentially an alias for <a
+ href="Session.html#method-i-servers_for">servers_for</a> without any
+ arguments. This is used primarily to satistfy the expectations of the <a
+ href="SessionActions.html">Net::SSH::Multi::SessionActions</a> module.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000070-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-servers-source'); return false">
[show source]
</a>
- <pre id='M000070-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 293</span>&#x000A;293: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">servers</span>&#x000A;294: <span class="ruby-identifier">servers_for</span>&#x000A;295: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-servers-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 293</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">servers</span>&#x000A; <span class="ruby-identifier">servers_for</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000071'>
- <a name='M000071'> </a>
+ <div class='method public-instance' id='method-method-i-servers_for'>
+ <a name='method-i-servers_for'></a>
<div class='synopsis'>
<span class='name'>servers_for</span>
<span class='arguments'>(*criteria)</span>
</div>
<div class='description'>
- <p>
- Returns the set of servers that match the given criteria. It can be used in
- any (or all) of three ways.
- </p>
- <p>
- First, you can omit any arguments. In this case, the full list of servers
- will be returned.
- </p>
+
+ <p>Returns the set of servers that match the given criteria. It can be used in
+ any (or all) of three ways.</p>
+
+ <p>First, you can omit any arguments. In this case, the full list of servers
+ will be returned.</p>
+
<pre>all = session.servers_for</pre>
- <p>
- Second, you can simply specify a list of group names. All servers in all
+
+ <p>Second, you can simply specify a list of group names. All servers in all
named groups will be returned. If a server belongs to multiple matching
groups, then it will appear only once in the list (the resulting list will
- contain only unique servers).
- </p>
+ contain only unique servers).</p>
+
<pre>servers = session.servers_for(:app, :db)</pre>
- <p>
- Last, you can specify a hash with group names as keys, and property
- constraints as the values. These property constraints are either
- &#8220;only&#8221; constraints (which restrict the set of servers to
- &#8220;only&#8221; those that match the given properties) or
- &#8220;except&#8221; constraints (which restrict the set of servers to
- those whose properties do <em>not</em> match). Properties are described
- when the server is defined (via the :properties key):
- </p>
- <pre>session.group :db do&#x000A; session.use 'dbmain', 'user', :properties =&gt; { :primary =&gt; true }&#x000A; session.use 'dbslave', 'user2'&#x000A; session.use 'dbslve2', 'user2'&#x000A;end&#x000A;&#x000A;# return ONLY on the servers in the :db group which have the :primary&#x000A;# property set to true.&#x000A;primary = session.servers_for(:db =&gt; { :only =&gt; { :primary =&gt; true } })</pre>
- <p>
- You can, naturally, combine these methods:
- </p>
- <pre># all servers in :app and :web, and all servers in :db with the&#x000A;# :primary property set to true&#x000A;servers = session.servers_for(:app, :web, :db =&gt; { :only =&gt; { :primary =&gt; true } })</pre>
+
+ <p>Last, you can specify a hash with group names as keys, and property
+ constraints as the values. These property constraints are either "only"
+ constraints (which restrict the set of servers to "only" those that match
+ the given properties) or "except" constraints (which restrict the set of
+ servers to those whose properties do <em>not</em> match). Properties are
+ described when the server is defined (via the :properties key):</p>
+
+ <pre class="ruby"><span class="ruby-identifier">session</span>.<span class="ruby-identifier">group</span> :<span class="ruby-identifier">db</span> <span class="ruby-keyword">do</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'dbmain'</span>, <span class="ruby-string">'user'</span>, :<span class="ruby-identifier">properties</span> =<span class="ruby-operator">&gt;</span> { :<span class="ruby-identifier">primary</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> }&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'dbslave'</span>, <span class="ruby-string">'user2'</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'dbslve2'</span>, <span class="ruby-string">'user2'</span>&#x000A;<span class="ruby-keyword">end</span>&#x000A;&#x000A;<span class="ruby-comment"># return ONLY on the servers in the :db group which have the :primary</span>&#x000A;<span class="ruby-comment"># property set to true.</span>&#x000A;<span class="ruby-identifier">primary</span> = <span class="ruby-identifier">session</span>.<span class="ruby-identifier">servers_for</span>(:<span class="ruby-identifier">db</span> =<span class="ruby-operator">&gt;</span> { :<span class="ruby-identifier">only</span> =<span class="ruby-operator">&gt;</span> { :<span class="ruby-identifier">primary</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> } })</pre>
+
+ <p>You can, naturally, combine these methods:</p>
+
+ <pre class="ruby"><span class="ruby-comment"># all servers in :app and :web, and all servers in :db with the</span>&#x000A;<span class="ruby-comment"># :primary property set to true</span>&#x000A;<span class="ruby-identifier">servers</span> = <span class="ruby-identifier">session</span>.<span class="ruby-identifier">servers_for</span>(:<span class="ruby-identifier">app</span>, :<span class="ruby-identifier">web</span>, :<span class="ruby-identifier">db</span> =<span class="ruby-operator">&gt;</span> { :<span class="ruby-identifier">only</span> =<span class="ruby-operator">&gt;</span> { :<span class="ruby-identifier">primary</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> } })</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000071-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-servers_for-source'); return false">
[show source]
</a>
- <pre id='M000071-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 334</span>&#x000A;334: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">servers_for</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">criteria</span>)&#x000A;335: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">criteria</span>.<span class="ruby-identifier">empty?</span>&#x000A;336: <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">flatten</span>&#x000A;337: <span class="ruby-keyword kw">else</span>&#x000A;338: <span class="ruby-comment cmt"># normalize the criteria list, so that every entry is a key to a</span>&#x000A;339: <span class="ruby-comment cmt"># criteria hash (possibly empty).</span>&#x000A;340: <span class="ruby-identifier">criteria</span> = <span class="ruby-identifier">criteria</span>.<span class="ruby-identifier">inject</span>({}) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>&#x000A;341: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">entry</span>&#x000A;342: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">entry</span>)&#x000A;343: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">entry</span> =<span class="ruby-operator">&gt;</span> {})&#x000A;344: <span class="ruby-keyword kw">end</span>&#x000A;345: <span class="ruby-keyword kw">end</span>&#x000A;346: &#x000A;347: <span class="ruby-identifier">list</span> = <span class="ruby-identifier">criteria</span>.<span class="ruby-identifier">inject</span>([]) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aggregator</span>, (<span class="ruby-identifier">group</span>, <span class="ruby-identifier">properties</span>)<span class="ruby-operator">|</span>&#x000A;348: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;the value for any group must be a Hash, but got a #{properties.class} for #{group.inspect}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)&#x000A;349: <span class="ruby-identifier">bad_keys</span> = <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> [<span class="ruby-identifier">:only</span>, <span class="ruby-identifier">:except</span>]&#x000A;350: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;unknown constraint(s) #{bad_keys.inspect} for #{group.inspect}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">bad_keys</span>.<span class="ruby-identifier">empty?</span>&#x000A;351: &#x000A;352: <span class="ruby-identifier">servers</span> = <span class="ruby-identifier">groups</span>[<span class="ruby-identifier">group</span>].<span class="ruby-identifier">select</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A;353: (<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:only</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">all?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>[<span class="ruby-identifier">prop</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span> } <span class="ruby-operator">&amp;&amp;</span>&#x000A;354: <span class="ruby-operator">!</span>(<span class="ruby-identifier">properties</span>[<span class="ruby-identifier">:except</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>[<span class="ruby-identifier">prop</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span> }&#x000A;355: <span class="ruby-keyword kw">end</span>&#x000A;356: &#x000A;357: <span class="ruby-identifier">aggregator</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">servers</span>)&#x000A;358: <span class="ruby-keyword kw">end</span>&#x000A;359: &#x000A;360: <span class="ruby-identifier">list</span>.<span class="ruby-identifier">uniq</span>&#x000A;361: <span class="ruby-keyword kw">end</span>&#x000A;362: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-servers_for-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 334</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">servers_for</span>(*<span class="ruby-identifier">criteria</span>)&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">criteria</span>.<span class="ruby-identifier">empty?</span>&#x000A; <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">flatten</span>&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-comment"># normalize the criteria list, so that every entry is a key to a</span>&#x000A; <span class="ruby-comment"># criteria hash (possibly empty).</span>&#x000A; <span class="ruby-identifier">criteria</span> = <span class="ruby-identifier">criteria</span>.<span class="ruby-identifier">inject</span>({}) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>, <span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-keyword">case</span> <span class="ruby-identifier">entry</span>&#x000A; <span class="ruby-keyword">when</span> <span class="ruby-constant">Hash</span> <span class="ruby-keyword">then</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">entry</span>)&#x000A; <span class="ruby-keyword">else</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">entry</span> =<span class="ruby-operator">&gt;</span> {})&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-identifier">list</span> = <span class="ruby-identifier">criteria</span>.<span class="ruby-identifier">inject</span>([]) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">aggregator</span>, (<span class="ruby-identifier">group</span>, <span class="ruby-identifier">properties</span>)<span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;the value for any group must be a Hash, but got a #{properties.class} for #{group.inspect}&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)&#x000A; <span class="ruby-identifier">bad_keys</span> = <span class="ruby-identifier">properties</span>.<span class="ruby-identifier">keys</span> <span class="ruby-operator">-</span> [<span class="ruby-value">:only</span>, <span class="ruby-value">:except</span>]&#x000A; <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">&quot;unknown constraint(s) #{bad_keys.inspect} for #{group.inspect}&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">bad_keys</span>.<span class="ruby-identifier">empty?</span>&#x000A;&#x000A; <span class="ruby-identifier">servers</span> = <span class="ruby-identifier">groups</span>[<span class="ruby-identifier">group</span>].<span class="ruby-identifier">select</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span>&#x000A; (<span class="ruby-identifier">properties</span>[<span class="ruby-value">:only</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">all?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>[<span class="ruby-identifier">prop</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span> } <span class="ruby-operator">&amp;&amp;</span>&#x000A; <span class="ruby-operator">!</span>(<span class="ruby-identifier">properties</span>[<span class="ruby-value">:except</span>] <span class="ruby-operator">||</span> {}).<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">prop</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>[<span class="ruby-identifier">prop</span>] <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span> }&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-identifier">aggregator</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">servers</span>)&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-identifier">list</span>.<span class="ruby-identifier">uniq</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000069'>
- <a name='M000069'> </a>
+ <div class='method public-instance' id='method-method-i-use'>
+ <a name='method-i-use'></a>
<div class='synopsis'>
<span class='name'>use</span>
- <span class='arguments'>(*hosts, &amp;block)</span>
+ <span class='arguments'>(*hosts, &block)</span>
</div>
<div class='description'>
- <p>
- Defines a new server definition, to be managed by this session. The server
- is at the given <tt>host</tt>, and will be connected to as the given
- <tt>user</tt>. The other options are passed as-is to the <a
- href="../../SSH.html">Net::SSH</a> session constructor.
- </p>
- <p>
- If a default gateway has been specified previously (with <a
- href="Session.html#M000068">via</a>) it will be passed to the new server
- definition. You can override this by passing a different Net::SSH::Gateway
- instance (or <tt>nil</tt>) with the :via key in the <tt>options</tt>.
- </p>
- <pre>session.use 'host'&#x000A;session.use 'user@host2', :via =&gt; nil&#x000A;session.use 'host3', :user =&gt; &quot;user3&quot;, :via =&gt; Net::SSH::Gateway.new('gateway.host', 'user')</pre>
- <p>
- If only a single host is given, the new server instance is returned. You
+
+ <p>Defines a new server definition, to be managed by this session. The server
+ is at the given <code>host</code>, and will be connected to as the given
+ <code>user</code>. The other options are passed as-is to the <a
+ href="../../SSH.html">Net::SSH</a> session constructor.</p>
+
+ <p>If a default gateway has been specified previously (with <a
+ href="Session.html#method-i-via">via</a>) it will be passed to the new
+ server definition. You can override this by passing a different
+ Net::SSH::Gateway instance (or <code>nil</code>) with the :via key in the
+ <code>options</code>.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'host'</span>&#x000A;<span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user@host2'</span>, :<span class="ruby-identifier">via</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">nil</span>&#x000A;<span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'host3'</span>, :<span class="ruby-identifier">user</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;user3&quot;</span>, :<span class="ruby-identifier">via</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Gateway</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">'gateway.host'</span>, <span class="ruby-string">'user'</span>)</pre>
+
+ <p>If only a single host is given, the new server instance is returned. You
can give multiple hosts at a time, though, in which case an array of server
- instances will be returned.
- </p>
+ instances will be returned.</p>
+
<pre>server1, server2 = session.use &quot;host1&quot;, &quot;host2&quot;</pre>
- <p>
- If given a block, this will save the block as a <a
+
+ <p>If given a block, this will save the block as a <a
href="DynamicServer.html">Net::SSH::Multi::DynamicServer</a> definition, to
be evaluated lazily the first time the server is needed. The block will
- recive any options hash given to <a href="Session.html#M000069">use</a>,
- and should return <tt>nil</tt> (if no servers are to be added), a String or
- an array of Strings (to be interpreted as a connection specification), or a
- <a href="Server.html">Server</a> or an array of Servers.
- </p>
+ recive any options hash given to <a
+ href="Session.html#method-i-use">use</a>, and should return
+ <code>nil</code> (if no servers are to be added), a String or an array of
+ Strings (to be interpreted as a connection specification), or a <a
+ href="Server.html">Server</a> or an array of Servers.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000069-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-use-source'); return false">
[show source]
</a>
- <pre id='M000069-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 274</span>&#x000A;274: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">use</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">hosts</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;275: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}&#x000A;276: <span class="ruby-identifier">options</span> = { <span class="ruby-identifier">:via</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">default_gateway</span> }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)&#x000A;277: &#x000A;278: <span class="ruby-identifier">results</span> = <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">host</span><span class="ruby-operator">|</span>&#x000A;279: <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">add</span>(<span class="ruby-constant">Server</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">host</span>, <span class="ruby-identifier">options</span>))&#x000A;280: <span class="ruby-keyword kw">end</span>&#x000A;281: &#x000A;282: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>&#x000A;283: <span class="ruby-identifier">results</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">add</span>(<span class="ruby-constant">DynamicServer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">block</span>))&#x000A;284: <span class="ruby-keyword kw">end</span>&#x000A;285: &#x000A;286: <span class="ruby-identifier">group</span> [] =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">results</span>&#x000A;287: <span class="ruby-identifier">results</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">results</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">results</span>.<span class="ruby-identifier">first</span>&#x000A;288: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-use-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 274</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">use</span>(*<span class="ruby-identifier">hosts</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">options</span> = <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">pop</span> <span class="ruby-operator">:</span> {}&#x000A; <span class="ruby-identifier">options</span> = { <span class="ruby-value">:via</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">default_gateway</span> }.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">options</span>)&#x000A;&#x000A; <span class="ruby-identifier">results</span> = <span class="ruby-identifier">hosts</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">host</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">add</span>(<span class="ruby-constant">Server</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">host</span>, <span class="ruby-identifier">options</span>))&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">block</span>&#x000A; <span class="ruby-identifier">results</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">add</span>(<span class="ruby-constant">DynamicServer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">block</span>))&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-identifier">group</span> [] =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">results</span>&#x000A; <span class="ruby-identifier">results</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">results</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">results</span>.<span class="ruby-identifier">first</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000068'>
- <a name='M000068'> </a>
+ <div class='method public-instance' id='method-method-i-via'>
+ <a name='method-i-via'></a>
<div class='synopsis'>
<span class='name'>via</span>
<span class='arguments'>(host, user, options={})</span>
</div>
<div class='description'>
- <p>
- Sets up a default gateway to use when establishing connections to servers.
+
+ <p>Sets up a default gateway to use when establishing connections to servers.
Note that any servers defined prior to this invocation will not use the
- default gateway; it only affects servers defined subsequently.
- </p>
+ default gateway; it only affects servers defined subsequently.</p>
+
<pre>session.via 'gateway.host', 'user'</pre>
- <p>
- You may override the default gateway on a per-server basis by passing the
- :via key to the <a href="Session.html#M000069">use</a> method; see <a
- href="Session.html#M000069">use</a> for details.
- </p>
+
+ <p>You may override the default gateway on a per-server basis by passing the
+ :via key to the <a href="Session.html#method-i-use">use</a> method; see <a
+ href="Session.html#method-i-use">use</a> for details.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000068-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-via-source'); return false">
[show source]
</a>
- <pre id='M000068-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 243</span>&#x000A;243: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">via</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">options</span>={})&#x000A;244: <span class="ruby-ivar">@default_gateway</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Gateway</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">options</span>)&#x000A;245: <span class="ruby-keyword kw">self</span>&#x000A;246: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-via-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 243</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">via</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">options</span>={})&#x000A; <span class="ruby-ivar">@default_gateway</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Gateway</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">options</span>)&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000072'>
- <a name='M000072'> </a>
+ <div class='method public-instance' id='method-method-i-with'>
+ <a name='method-i-with'></a>
<div class='synopsis'>
<span class='name'>with</span>
- <span class='arguments'>(*groups) {|subsession if block_given?| ...}</span>
+ <span class='arguments'>(*groups)</span>
</div>
<div class='description'>
- <p>
- Returns a new <a href="Subsession.html">Net::SSH::Multi::Subsession</a>
+
+ <p>Returns a new <a href="Subsession.html">Net::SSH::Multi::Subsession</a>
instance consisting of the servers that meet the given criteria. If a block
is given, the subsession will be yielded to it. See <a
- href="Session.html#M000071">servers_for</a> for a discussion of how these
- criteria are interpreted.
- </p>
- <pre>session.with(:app).exec('hostname')&#x000A;&#x000A;session.with(:app, :db =&gt; { :primary =&gt; true }) do |s|&#x000A; s.exec 'date'&#x000A; s.exec 'uptime'&#x000A;end</pre>
+ href="Session.html#method-i-servers_for">servers_for</a> for a discussion
+ of how these criteria are interpreted.</p>
+
+ <pre class="ruby"><span class="ruby-identifier">session</span>.<span class="ruby-identifier">with</span>(:<span class="ruby-identifier">app</span>).<span class="ruby-identifier">exec</span>(<span class="ruby-string">'hostname'</span>)&#x000A;&#x000A;<span class="ruby-identifier">session</span>.<span class="ruby-identifier">with</span>(:<span class="ruby-identifier">app</span>, :<span class="ruby-identifier">db</span> =<span class="ruby-operator">&gt;</span> { :<span class="ruby-identifier">primary</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword">true</span> }) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">s</span>.<span class="ruby-identifier">exec</span> <span class="ruby-string">'date'</span>&#x000A; <span class="ruby-identifier">s</span>.<span class="ruby-identifier">exec</span> <span class="ruby-string">'uptime'</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000072-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-with-source'); return false">
[show source]
</a>
- <pre id='M000072-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session.rb, line 375</span>&#x000A;375: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">groups</span>)&#x000A;376: <span class="ruby-identifier">subsession</span> = <span class="ruby-constant">Subsession</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">servers_for</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">groups</span>))&#x000A;377: <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">subsession</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>&#x000A;378: <span class="ruby-identifier">subsession</span>&#x000A;379: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-with-source'><span class="ruby-comment"># File lib/net/ssh/multi/session.rb, line 375</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">with</span>(*<span class="ruby-identifier">groups</span>)&#x000A; <span class="ruby-identifier">subsession</span> = <span class="ruby-constant">Subsession</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">servers_for</span>(*<span class="ruby-identifier">groups</span>))&#x000A; <span class="ruby-keyword">yield</span> <span class="ruby-identifier">subsession</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>&#x000A; <span class="ruby-identifier">subsession</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -554,7 +569,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/SessionActions.html b/classes/Net/SSH/Multi/SessionActions.html
index ad9a7b4..78bd4a6 100644
--- a/classes/Net/SSH/Multi/SessionActions.html
+++ b/classes/Net/SSH/Multi/SessionActions.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::SessionActions [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::SessionActions</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,237 +26,230 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Module</span>
+ <span class='type'>module</span>
Net::SSH::Multi::SessionActions
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a>
</li>
</ol>
+ <div class='parent'>
+ Parent:
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
+ </div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- This module represents the actions that are available on session
+
+ <p>This module represents the actions that are available on session
collections. Any class that includes this module needs only provide a
- <tt>servers</tt> method that returns a list of <a
+ <code>servers</code> method that returns a list of <a
href="Server.html">Net::SSH::Multi::Server</a> instances, and the rest just
works. See <a href="Session.html">Net::SSH::Multi::Session</a> and <a
href="Subsession.html">Net::SSH::Multi::Subsession</a> for consumers of
- this module.
- </p>
+ this module.</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000004">busy?</a></li>
- <li><a href="#M000003">connect!</a></li>
- <li><a href="#M000008">exec</a></li>
- <li><a href="#M000002">master</a></li>
- <li><a href="#M000007">open_channel</a></li>
- <li><a href="#M000006">send_global_request</a></li>
- <li><a href="#M000005">sessions</a></li>
+ <li><a target="docwin" href="#method-i-busy-3F">busy?</a></li>
+ <li><a target="docwin" href="#method-i-connect-21">connect!</a></li>
+ <li><a target="docwin" href="#method-i-exec">exec</a></li>
+ <li><a target="docwin" href="#method-i-master">master</a></li>
+ <li><a target="docwin" href="#method-i-open_channel">open_channel</a></li>
+ <li><a target="docwin" href="#method-i-send_global_request">send_global_request</a></li>
+ <li><a target="docwin" href="#method-i-sessions">sessions</a></li>
</ol>
</div>
+ <div id='context'>
+ </div>
<div id='section'>
<div id='methods'>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000004'>
- <a name='M000004'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-busy-3F'>
+ <a name='method-i-busy-3F'></a>
<div class='synopsis'>
<span class='name'>busy?</span>
<span class='arguments'>(include_invisible=false)</span>
</div>
<div class='description'>
- <p>
- Returns <tt>true</tt> if any server in the current container has an open <a
- href="../../SSH.html">SSH</a> session that is currently processing any
- channels. If <tt>include_invisible</tt> is <tt>false</tt> (the default)
- then invisible channels (such as those created by port forwarding) will not
- be counted; otherwise, they will be.
- </p>
+
+ <p>Returns <code>true</code> if any server in the current container has an
+ open <a href="../../SSH.html">SSH</a> session that is currently processing
+ any channels. If <code>include_invisible</code> is <code>false</code> (the
+ default) then invisible channels (such as those created by port forwarding)
+ will not be counted; otherwise, they will be.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000004-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-busy-3F-source'); return false">
[show source]
</a>
- <pre id='M000004-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session_actions.rb, line 29</span>&#x000A;29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>=<span class="ruby-keyword kw">false</span>)&#x000A;30: <span class="ruby-identifier">servers</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>) }&#x000A;31: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-busy-3F-source'><span class="ruby-comment"># File lib/net/ssh/multi/session_actions.rb, line 29</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>=<span class="ruby-keyword">false</span>)&#x000A; <span class="ruby-identifier">servers</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">busy?</span>(<span class="ruby-identifier">include_invisible</span>) }&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000003'>
- <a name='M000003'> </a>
+ <div class='method public-instance' id='method-method-i-connect-21'>
+ <a name='method-i-connect-21'></a>
<div class='synopsis'>
<span class='name'>connect!</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Connections are normally established lazily, as soon as they are needed.
+
+ <p>Connections are normally established lazily, as soon as they are needed.
This method forces all servers in the current container to have their
connections established immediately, blocking until the connections have
- been made.
- </p>
+ been made.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000003-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-connect-21-source'); return false">
[show source]
</a>
- <pre id='M000003-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session_actions.rb, line 20</span>&#x000A;20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connect!</span>&#x000A;21: <span class="ruby-identifier">sessions</span>&#x000A;22: <span class="ruby-keyword kw">self</span>&#x000A;23: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-connect-21-source'><span class="ruby-comment"># File lib/net/ssh/multi/session_actions.rb, line 20</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">connect!</span>&#x000A; <span class="ruby-identifier">sessions</span>&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000008'>
- <a name='M000008'> </a>
+ <div class='method public-instance' id='method-method-i-exec'>
+ <a name='method-i-exec'></a>
<div class='synopsis'>
<span class='name'>exec</span>
- <span class='arguments'>(command, &amp;block)</span>
+ <span class='arguments'>(command, &block)</span>
</div>
<div class='description'>
- <p>
- A convenience method for executing a command on multiple hosts and either
+
+ <p>A convenience method for executing a command on multiple hosts and either
displaying or capturing the output. It opens a channel on all active
- sessions (see <a href="SessionActions.html#M000007">open_channel</a> and
+ sessions (see <a
+ href="SessionActions.html#method-i-open_channel">open_channel</a> and
active_sessions), and then executes a command on each channel
- (Net::SSH::Connection::Channel#exec).
- </p>
- <p>
- If a block is given, it will be invoked whenever data is received across
+ (Net::SSH::Connection::Channel#exec).</p>
+
+ <p>If a block is given, it will be invoked whenever data is received across
the channel, with three arguments: the channel object, a symbol identifying
- which output stream the data was received on (<tt>:stdout</tt> or
- <tt>:stderr</tt>) and a string containing the data that was received:
- </p>
- <pre>session.exec(&quot;command&quot;) do |ch, stream, data|&#x000A; puts &quot;[#{ch[:host]} : #{stream}] #{data}&quot;&#x000A;end</pre>
- <p>
- If no block is given, all output will be written to +$stdout+ or +$stderr+,
- as appropriate.
- </p>
- <p>
- Note that <a href="SessionActions.html#M000008">exec</a> will also capture
- the exit status of the process in the <tt>:exit_status</tt> property of
- each channel. Since <a href="SessionActions.html#M000008">exec</a> returns
- all of the channels in a <a
- href="Channel.html">Net::SSH::Multi::Channel</a> object, you can check for
- the exit status like this:
- </p>
- <pre>channel = session.exec(&quot;command&quot;) { ... }&#x000A;channel.wait&#x000A;&#x000A;if channel.any? { |c| c[:exit_status] != 0 }&#x000A; puts &quot;executing failed on at least one host!&quot;&#x000A;end</pre>
+ which output stream the data was received on (<code>:stdout</code> or
+ <code>:stderr</code>) and a string containing the data that was received:</p>
+
+ <pre class="ruby"><span class="ruby-identifier">session</span>.<span class="ruby-identifier">exec</span>(<span class="ruby-string">&quot;command&quot;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">stream</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;[#{ch[:host]} : #{stream}] #{data}&quot;</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>If no block is given, all output will be written to +$stdout+ or +$stderr+,
+ as appropriate.</p>
+
+ <p>Note that <a href="SessionActions.html#method-i-exec">exec</a> will also
+ capture the exit status of the process in the <code>:exit_status</code>
+ property of each channel. Since <a
+ href="SessionActions.html#method-i-exec">exec</a> returns all of the
+ channels in a <a href="Channel.html">Net::SSH::Multi::Channel</a> object,
+ you can check for the exit status like this:</p>
+
+ <pre class="ruby"><span class="ruby-identifier">channel</span> = <span class="ruby-identifier">session</span>.<span class="ruby-identifier">exec</span>(<span class="ruby-string">&quot;command&quot;</span>) { <span class="ruby-operator">...</span> }&#x000A;<span class="ruby-identifier">channel</span>.<span class="ruby-identifier">wait</span>&#x000A;&#x000A;<span class="ruby-keyword">if</span> <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>[:<span class="ruby-identifier">exit_status</span>] <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> }&#x000A; <span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;executing failed on at least one host!&quot;</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000008-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-exec-source'); return false">
[show source]
</a>
- <pre id='M000008-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session_actions.rb, line 119</span>&#x000A;119: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">exec</span>(<span class="ruby-identifier">command</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)&#x000A;120: <span class="ruby-identifier">open_channel</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span>&#x000A;121: <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">exec</span>(<span class="ruby-identifier">command</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">success</span><span class="ruby-operator">|</span>&#x000A;122: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;could not execute command: #{command.inspect} (#{ch[:host]})&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">success</span>&#x000A;123: &#x000A;124: <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_data</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A;125: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>&#x000A;126: <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">ch</span>, <span class="ruby-identifier">:stdout</span>, <span class="ruby-identifier">data</span>)&#x000A;127: <span class="ruby-keyword kw">else</span>&#x000A;128: <span class="ruby-identifier">data</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>&#x000A;129: <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-node">&quot;[#{ch[:host]}] #{line}&quot;</span>)&#x000A;130: <span class="ruby-keyword kw">end</span>&#x000A;131: <span class="ruby-keyword kw">end</span>&#x000A;132: <span class="ruby-keyword kw">end</span>&#x000A;133: &#x000A;134: <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_extended_data</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A;135: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span>&#x000A;136: <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">ch</span>, <span class="ruby-identifier">:stderr</span>, <span class="ruby-identifier">data</span>)&#x000A;137: <span class="ruby-keyword kw">else</span>&#x000A;138: <span class="ruby-identifier">data</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>&#x000A;139: <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-node">&quot;[#{ch[:host]}] #{line}&quot;</span>)&#x000A;140: <span class="ruby-keyword kw">end</span>&#x000A;141: <span class="ruby-keyword kw">end</span>&#x000A;142: <span class="ruby-keyword kw">end</span>&#x000A;143: &#x000A;144: <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_request</span>(<span class="ruby-value str">&quot;exit-status&quot;</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A;145: <span class="ruby-identifier">ch</span>[<span class="ruby-identifier">:exit_status</span>] = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">read_long</span>&#x000A;146: <span class="ruby-keyword kw">end</span>&#x000A;147: <span class="ruby-keyword kw">end</span>&#x000A;148: <span class="ruby-keyword kw">end</span>&#x000A;149: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-exec-source'><span class="ruby-comment"># File lib/net/ssh/multi/session_actions.rb, line 119</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">exec</span>(<span class="ruby-identifier">command</span>, &amp;<span class="ruby-identifier">block</span>)&#x000A; <span class="ruby-identifier">open_channel</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">exec</span>(<span class="ruby-identifier">command</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">success</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;could not execute command: #{command.inspect} (#{ch[:host]})&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">success</span>&#x000A;&#x000A; <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_data</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">block</span>&#x000A; <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">ch</span>, <span class="ruby-value">:stdout</span>, <span class="ruby-identifier">data</span>)&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-identifier">data</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-node">&quot;[#{ch[:host]}] #{line}&quot;</span>)&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_extended_data</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-keyword">if</span> <span class="ruby-identifier">block</span>&#x000A; <span class="ruby-identifier">block</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">ch</span>, <span class="ruby-value">:stderr</span>, <span class="ruby-identifier">data</span>)&#x000A; <span class="ruby-keyword">else</span>&#x000A; <span class="ruby-identifier">data</span>.<span class="ruby-identifier">chomp</span>.<span class="ruby-identifier">each_line</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">$stderr</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-node">&quot;[#{ch[:host]}] #{line}&quot;</span>)&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">on_request</span>(<span class="ruby-string">&quot;exit-status&quot;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">ch</span>[<span class="ruby-value">:exit_status</span>] = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">read_long</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000002'>
- <a name='M000002'> </a>
+ <div class='method public-instance' id='method-method-i-master'>
+ <a name='method-i-master'></a>
<div class='synopsis'>
<span class='name'>master</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns the session that is the &#8220;master&#8221;. This defaults to
- <tt>self</tt>, but classes that include this module may wish to change this
- if they are subsessions that depend on a master session.
- </p>
+
+ <p>Returns the session that is the "master". This defaults to
+ <code>self</code>, but classes that include this module may wish to change
+ this if they are subsessions that depend on a master session.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000002-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-master-source'); return false">
[show source]
</a>
- <pre id='M000002-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session_actions.rb, line 12</span>&#x000A;12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">master</span>&#x000A;13: <span class="ruby-keyword kw">self</span>&#x000A;14: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-master-source'><span class="ruby-comment"># File lib/net/ssh/multi/session_actions.rb, line 12</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">master</span>&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000007'>
- <a name='M000007'> </a>
+ <div class='method public-instance' id='method-method-i-open_channel'>
+ <a name='method-i-open_channel'></a>
<div class='synopsis'>
<span class='name'>open_channel</span>
- <span class='arguments'>(type=&quot;session&quot;, *extra, &amp;on_confirm)</span>
+ <span class='arguments'>(type="session", *extra, &on_confirm)</span>
</div>
<div class='description'>
- <p>
- Asks all sessions for all contained servers (see <a
- href="SessionActions.html#M000005">sessions</a>) to open a new channel.
- When each server responds, the <tt>on_confirm</tt> block will be invoked
- with a single argument, the channel object for that server. This means that
- the block will be invoked one time for each session.
- </p>
- <p>
- All new channels will be collected and returned, aggregated into a new <a
- href="Channel.html">Net::SSH::Multi::Channel</a> instance.
- </p>
- <p>
- Note that the channels are &#8220;enhanced&#8221; slightly&#8212;they have
- two properties set on them automatically, to make dealing with them in a
- multi-session environment slightly easier:
- </p>
- <ul>
- <li>:server => the <a href="Server.html">Net::SSH::Multi::Server</a> instance
- that spawned the channel
- </li>
- <li>:host => the host name of the server
+ <p>Asks all sessions for all contained servers (see <a
+ href="SessionActions.html#method-i-sessions">sessions</a>) to open a new
+ channel. When each server responds, the <code>on_confirm</code> block will
+ be invoked with a single argument, the channel object for that server. This
+ means that the block will be invoked one time for each session.</p>
+
+ <p>All new channels will be collected and returned, aggregated into a new <a
+ href="Channel.html">Net::SSH::Multi::Channel</a> instance.</p>
+
+ <p>Note that the channels are "enhanced" slightly--they have two properties
+ set on them automatically, to make dealing with them in a multi-session
+ environment slightly easier:</p>
+ <ul><li>
+ <p>:server =&gt; the <a href="Server.html">Net::SSH::Multi::Server</a>
+ instance that spawned the channel</p>
+ </li><li>
+ <p>:host =&gt; the host name of the server</p>
+ </li></ul>
+
+ <p>Having access to these things lets you more easily report which host (e.g.)
+ data was received from:</p>
- </li>
- </ul>
- <p>
- Having access to these things lets you more easily report which host (e.g.)
- data was received from:
- </p>
- <pre>session.open_channel do |channel|&#x000A; channel.exec &quot;command&quot; do |ch, success|&#x000A; ch.on_data do |ch, data|&#x000A; puts &quot;got data #{data} from #{ch[:host]}&quot;&#x000A; end&#x000A; end&#x000A;end</pre>
+ <pre class="ruby"><span class="ruby-identifier">session</span>.<span class="ruby-identifier">open_channel</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">channel</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">exec</span> <span class="ruby-string">&quot;command&quot;</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">success</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">ch</span>.<span class="ruby-identifier">on_data</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ch</span>, <span class="ruby-identifier">data</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;got data #{data} from #{ch[:host]}&quot;</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000007-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-open_channel-source'); return false">
[show source]
</a>
- <pre id='M000007-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session_actions.rb, line 80</span>&#x000A;80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open_channel</span>(<span class="ruby-identifier">type</span>=<span class="ruby-value str">&quot;session&quot;</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">extra</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">on_confirm</span>)&#x000A;81: <span class="ruby-identifier">channels</span> = <span class="ruby-identifier">sessions</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ssh</span><span class="ruby-operator">|</span>&#x000A;82: <span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">open_channel</span>(<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">extra</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>&#x000A;83: <span class="ruby-identifier">c</span>[<span class="ruby-identifier">:server</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connection</span>[<span class="ruby-identifier">:server</span>]&#x000A;84: <span class="ruby-identifier">c</span>[<span class="ruby-identifier">:host</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connection</span>[<span class="ruby-identifier">:server</span>].<span class="ruby-identifier">host</span>&#x000A;85: <span class="ruby-identifier">on_confirm</span>[<span class="ruby-identifier">c</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">on_confirm</span>&#x000A;86: <span class="ruby-keyword kw">end</span>&#x000A;87: <span class="ruby-keyword kw">end</span>&#x000A;88: <span class="ruby-constant">Multi</span><span class="ruby-operator">::</span><span class="ruby-constant">Channel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">channels</span>)&#x000A;89: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-open_channel-source'><span class="ruby-comment"># File lib/net/ssh/multi/session_actions.rb, line 80</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">open_channel</span>(<span class="ruby-identifier">type</span>=<span class="ruby-string">&quot;session&quot;</span>, *<span class="ruby-identifier">extra</span>, &amp;<span class="ruby-identifier">on_confirm</span>)&#x000A; <span class="ruby-identifier">channels</span> = <span class="ruby-identifier">sessions</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ssh</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">open_channel</span>(<span class="ruby-identifier">type</span>, *<span class="ruby-identifier">extra</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-identifier">c</span>[<span class="ruby-value">:server</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connection</span>[<span class="ruby-value">:server</span>]&#x000A; <span class="ruby-identifier">c</span>[<span class="ruby-value">:host</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">connection</span>[<span class="ruby-value">:server</span>].<span class="ruby-identifier">host</span>&#x000A; <span class="ruby-identifier">on_confirm</span>[<span class="ruby-identifier">c</span>] <span class="ruby-keyword">if</span> <span class="ruby-identifier">on_confirm</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A; <span class="ruby-constant">Multi</span><span class="ruby-operator">::</span><span class="ruby-constant">Channel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">channels</span>)&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000006'>
- <a name='M000006'> </a>
+ <div class='method public-instance' id='method-method-i-send_global_request'>
+ <a name='method-i-send_global_request'></a>
<div class='synopsis'>
<span class='name'>send_global_request</span>
- <span class='arguments'>(type, *extra, &amp;callback)</span>
+ <span class='arguments'>(type, *extra, &callback)</span>
</div>
<div class='description'>
- <p>
- Sends a global request to the sessions for all contained servers (see <a
- href="SessionActions.html#M000005">sessions</a>). This can be used to
- (e.g.) ping the remote servers to prevent them from timing out.
- </p>
+
+ <p>Sends a global request to the sessions for all contained servers (see <a
+ href="SessionActions.html#method-i-sessions">sessions</a>). This can be
+ used to (e.g.) ping the remote servers to prevent them from timing out.</p>
+
<pre>session.send_global_request(&quot;keep-alive@openssh.com&quot;)</pre>
- <p>
- If a block is given, it will be invoked when the server responds, with two
+
+ <p>If a block is given, it will be invoked when the server responds, with two
arguments: the <a href="../../SSH.html">Net::SSH</a> connection that is
- responding, and a boolean indicating whether the request succeeded or not.
- </p>
+ responding, and a boolean indicating whether the request succeeded or not.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000006-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-send_global_request-source'); return false">
[show source]
</a>
- <pre id='M000006-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session_actions.rb, line 50</span>&#x000A;50: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_global_request</span>(<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">extra</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">callback</span>)&#x000A;51: <span class="ruby-identifier">sessions</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">ssh</span><span class="ruby-operator">|</span> <span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">send_global_request</span>(<span class="ruby-identifier">type</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">extra</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">callback</span>) }&#x000A;52: <span class="ruby-keyword kw">self</span>&#x000A;53: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-send_global_request-source'><span class="ruby-comment"># File lib/net/ssh/multi/session_actions.rb, line 50</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">send_global_request</span>(<span class="ruby-identifier">type</span>, *<span class="ruby-identifier">extra</span>, &amp;<span class="ruby-identifier">callback</span>)&#x000A; <span class="ruby-identifier">sessions</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">ssh</span><span class="ruby-operator">|</span> <span class="ruby-identifier">ssh</span>.<span class="ruby-identifier">send_global_request</span>(<span class="ruby-identifier">type</span>, *<span class="ruby-identifier">extra</span>, &amp;<span class="ruby-identifier">callback</span>) }&#x000A; <span class="ruby-keyword">self</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000005'>
- <a name='M000005'> </a>
+ <div class='method public-instance' id='method-method-i-sessions'>
+ <a name='method-i-sessions'></a>
<div class='synopsis'>
<span class='name'>sessions</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns an array of all <a href="../../SSH.html">SSH</a> sessions, blocking
- until all sessions have connected.
- </p>
+
+ <p>Returns an array of all <a href="../../SSH.html">SSH</a> sessions, blocking
+ until all sessions have connected.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000005-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-sessions-source'); return false">
[show source]
</a>
- <pre id='M000005-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/session_actions.rb, line 35</span>&#x000A;35: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sessions</span>&#x000A;36: <span class="ruby-identifier">threads</span> = <span class="ruby-identifier">servers</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">server</span>.<span class="ruby-identifier">session</span>(<span class="ruby-keyword kw">true</span>) } <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">session</span>.<span class="ruby-identifier">nil?</span> }&#x000A;37: <span class="ruby-identifier">threads</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">thread</span><span class="ruby-operator">|</span> <span class="ruby-identifier">thread</span>.<span class="ruby-identifier">join</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">thread</span> }&#x000A;38: <span class="ruby-identifier">servers</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">session</span> }.<span class="ruby-identifier">compact</span>&#x000A;39: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-sessions-source'><span class="ruby-comment"># File lib/net/ssh/multi/session_actions.rb, line 35</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">sessions</span>&#x000A; <span class="ruby-identifier">threads</span> = <span class="ruby-identifier">servers</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">server</span>.<span class="ruby-identifier">session</span>(<span class="ruby-keyword">true</span>) } <span class="ruby-keyword">if</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">session</span>.<span class="ruby-identifier">nil?</span> }&#x000A; <span class="ruby-identifier">threads</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">thread</span><span class="ruby-operator">|</span> <span class="ruby-identifier">thread</span>.<span class="ruby-identifier">join</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">thread</span> }&#x000A; <span class="ruby-identifier">servers</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">server</span><span class="ruby-operator">|</span> <span class="ruby-identifier">server</span>.<span class="ruby-identifier">session</span> }.<span class="ruby-identifier">compact</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -266,7 +259,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/Subsession.html b/classes/Net/SSH/Multi/Subsession.html
index e6268a7..7c18b21 100644
--- a/classes/Net/SSH/Multi/Subsession.html
+++ b/classes/Net/SSH/Multi/Subsession.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::Subsession [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::Subsession</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,45 +26,47 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::Subsession
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Object</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- A trivial class for representing a subset of servers. It is used internally
- for restricting operations to a subset of all defined servers.
- </p>
+
+ <p>A trivial class for representing a subset of servers. It is used internally
+ for restricting operations to a subset of all defined servers.</p>
+
<pre>subsession = session.with(:app)&#x000A;subsession.exec(&quot;hostname&quot;)</pre>
</div>
<div id='method-list'>
<h2>Methods</h2>
- <h3>public class</h3>
+ <h3>Public Class</h3>
<ol>
- <li><a href="#M000078">new</a></li>
+ <li><a target="docwin" href="#method-c-new">new</a></li>
</ol>
- <h3>public instance</h3>
+ <h3>Public Instance</h3>
<ol>
- <li><a href="#M000080">first</a></li>
- <li><a href="#M000079">slice</a></li>
+ <li><a target="docwin" href="#method-i-first">first</a></li>
+ <li><a target="docwin" href="#attribute-i-master">master</a></li>
+ <li><a target="docwin" href="#attribute-i-servers">servers</a></li>
+ <li><a target="docwin" href="#method-i-slice">slice</a></li>
</ol>
</div>
<div id='context'>
<div id='includes'>
<h2>Included modules</h2>
<ol>
- <li><a href="SessionActions.html">SessionActions</a></li>
+ <li><a target="docwin" href="SessionActions.html">SessionActions</a></li>
</ol>
</div>
</div>
@@ -74,86 +76,90 @@
<div class='name-list'>
<table>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>master</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-master'>master</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The master session that spawned this subsession.
+ <p>The master session that spawned this subsession.</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>servers</td>
+ <td class='context-item-name'>
+ <a name='attribute-i-servers'>servers</a>
+ </td>
<td class='context-item-value'>[R]</td>
<td class='context-item-desc'>
- The list of servers that this subsession can operate on.
+ <p>The list of servers that this subsession can operate on.</p>
</td>
</tr>
</table>
</div>
</div>
<div id='methods'>
- <h2>Public class methods</h2>
- <div class='method public-class' id='method-M000078'>
- <a name='M000078'> </a>
+ <h2>Public Class methods</h2>
+ <div class='method public-class' id='method-method-c-new'>
+ <a name='method-c-new'></a>
<div class='synopsis'>
<span class='name'>new</span>
<span class='arguments'>(master, server_list)</span>
</div>
<div class='description'>
- <p>
- Create a new subsession of the given <tt>master</tt> session, that operates
- on the given <tt>server_list</tt>.
- </p>
+
+ <p>Create a new subsession of the given <code>master</code> session, that
+ operates on the given <code>server_list</code>.</p>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000078-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-c-new-source'); return false">
[show source]
</a>
- <pre id='M000078-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/subsession.rb, line 22</span>&#x000A;22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">server_list</span>)&#x000A;23: <span class="ruby-ivar">@master</span> = <span class="ruby-identifier">master</span>&#x000A;24: <span class="ruby-ivar">@servers</span> = <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">uniq</span>&#x000A;25: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-c-new-source'><span class="ruby-comment"># File lib/net/ssh/multi/subsession.rb, line 22</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">master</span>, <span class="ruby-identifier">server_list</span>)&#x000A; <span class="ruby-ivar">@master</span> = <span class="ruby-identifier">master</span>&#x000A; <span class="ruby-ivar">@servers</span> = <span class="ruby-identifier">server_list</span>.<span class="ruby-identifier">uniq</span>&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <h2>Public instance methods</h2>
- <div class='method public-instance' id='method-M000080'>
- <a name='M000080'> </a>
+ <h2>Public Instance methods</h2>
+ <div class='method public-instance' id='method-method-i-first'>
+ <a name='method-i-first'></a>
<div class='synopsis'>
<span class='name'>first</span>
<span class='arguments'>()</span>
</div>
<div class='description'>
- <p>
- Returns a new subsession that consists of only the first server in the
- server list of the current subsession. This is just convenience for
- slice(0):
- </p>
+
+ <p>Returns a new subsession that consists of only the first server in the
+ server list of the current subsession. This is just convenience for <a
+ href="Subsession.html#method-i-slice">slice(0)</a>:</p>
+
<pre>s1 = subsession.first</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000080-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-first-source'); return false">
[show source]
</a>
- <pre id='M000080-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/subsession.rb, line 43</span>&#x000A;43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">first</span>&#x000A;44: <span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span>)&#x000A;45: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-first-source'><span class="ruby-comment"># File lib/net/ssh/multi/subsession.rb, line 43</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">first</span>&#x000A; <span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span>)&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
- <div class='method public-instance' id='method-M000079'>
- <a name='M000079'> </a>
+ <div class='method public-instance' id='method-method-i-slice'>
+ <a name='method-i-slice'></a>
<div class='synopsis'>
<span class='name'>slice</span>
<span class='arguments'>(*args)</span>
</div>
<div class='description'>
- <p>
- Works as Array#slice, but returns a new subsession consisting of the given
+
+ <p>Works as Array#slice, but returns a new subsession consisting of the given
slice of servers in this subsession. The new subsession will have the same
- master session as this subsession does.
- </p>
+ <a href="Subsession.html#attribute-i-master">master</a> session as this
+ subsession does.</p>
+
<pre>s1 = subsession.slice(0)&#x000A;s2 = subsession.slice(3, -1)&#x000A;s3 = subsession.slice(1..4)</pre>
</div>
<div class='source'>
- <a class='source-toggle' href='#' onclick="toggleCode('M000079-source'); return false">
+ <a class='source-toggle' href='#' onclick="toggleCode('method-i-slice-source'); return false">
[show source]
</a>
- <pre id='M000079-source'> <span class="ruby-comment cmt"># File lib/net/ssh/multi/subsession.rb, line 34</span>&#x000A;34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">slice</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)&#x000A;35: <span class="ruby-constant">Subsession</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">master</span>, <span class="ruby-constant">Array</span>(<span class="ruby-identifier">servers</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)))&#x000A;36: <span class="ruby-keyword kw">end</span></pre>
+ <pre id='method-i-slice-source'><span class="ruby-comment"># File lib/net/ssh/multi/subsession.rb, line 34</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">slice</span>(*<span class="ruby-identifier">args</span>)&#x000A; <span class="ruby-constant">Subsession</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">master</span>, <span class="ruby-constant">Array</span>(<span class="ruby-identifier">servers</span>.<span class="ruby-identifier">slice</span>(*<span class="ruby-identifier">args</span>)))&#x000A;<span class="ruby-keyword">end</span></pre>
</div>
</div>
</div>
@@ -163,7 +169,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/classes/Net/SSH/Multi/Version.html b/classes/Net/SSH/Multi/Version.html
index 3b9b8ad..8579d7b 100644
--- a/classes/Net/SSH/Multi/Version.html
+++ b/classes/Net/SSH/Multi/Version.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>: Net::SSH::Multi::Version [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>Net::SSH::Multi::Version</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -26,25 +26,26 @@
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
- <span class='type'>Class</span>
+ <span class='type'>class</span>
Net::SSH::Multi::Version
</h1>
<ol class='paths'>
<li>
- <a href="../../../../files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a>
+ <a target="docwin" href="../../../../files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a>
</li>
</ol>
<div class='parent'>
Parent:
- <strong>Net::SSH::Version</strong>
+ <strong><a target="docwin" href="../Multi.html">Multi</a></strong>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <p>
- A trivial class for representing the version of this library.
- </p>
+
+ <p>A trivial class for representing the version of this library.</p>
+ </div>
+ <div id='context'>
</div>
<div id='section'>
<div id='constants-list'>
@@ -52,54 +53,53 @@
<div class='name-list'>
<table summary='Constants'>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>MAJOR</td>
+ <td class='context-item-name'>CURRENT</td>
<td>=</td>
- <td class='context-item-value'>1</td>
+ <td class='context-item-value'>new(MAJOR, MINOR, TINY)</td>
<td>&nbsp;</td>
<td class='context-item-desc'>
- The major component of the library&#8217;s version
+ <p>The library's version as a <a href="Version.html">Version</a> instance</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>MINOR</td>
+ <td class='context-item-name'>MAJOR</td>
<td>=</td>
<td class='context-item-value'>1</td>
<td>&nbsp;</td>
<td class='context-item-desc'>
- The minor component of the library&#8217;s version
+ <p>The major component of the library's version</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>TINY</td>
+ <td class='context-item-name'>MINOR</td>
<td>=</td>
- <td class='context-item-value'>0</td>
+ <td class='context-item-value'>1</td>
<td>&nbsp;</td>
<td class='context-item-desc'>
- The tiny component of the library&#8217;s version
+ <p>The minor component of the library's version</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>CURRENT</td>
+ <td class='context-item-name'>STRING</td>
<td>=</td>
- <td class='context-item-value'>new(MAJOR, MINOR, TINY)</td>
+ <td class='context-item-value'>CURRENT.to_s</td>
<td>&nbsp;</td>
<td class='context-item-desc'>
- The library&#8217;s version as a <a href="Version.html">Version</a>
- instance
+ <p>The library's version as a String instance</p>
</td>
</tr>
<tr class='top-aligned-row context-row'>
- <td class='context-item-name'>STRING</td>
+ <td class='context-item-name'>TINY</td>
<td>=</td>
- <td class='context-item-value'>CURRENT.to_s</td>
+ <td class='context-item-value'>0</td>
<td>&nbsp;</td>
<td class='context-item-desc'>
- The library&#8217;s version as a String instance
+ <p>The tiny component of the library's version</p>
</td>
</tr>
</table>
@@ -111,7 +111,7 @@
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/created.rid b/created.rid
index 2649bc5..dabcc83 100644
--- a/created.rid
+++ b/created.rid
@@ -1 +1,15 @@
-Sun, 03 Apr 2011 16:39:39 -0400
+Wed, 06 Feb 2013 08:04:38 -0800
+README.rdoc Wed, 06 Feb 2013 08:04:30 -0800
+lib/net/ssh/multi/channel.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/channel_proxy.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/dynamic_server.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/pending_connection.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/server.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/server_list.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/session.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/session_actions.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/subsession.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi/version.rb Wed, 06 Feb 2013 08:04:22 -0800
+lib/net/ssh/multi.rb Wed, 06 Feb 2013 08:04:22 -0800
+LICENSE.txt Wed, 06 Feb 2013 08:04:30 -0800
+CHANGES.txt Wed, 06 Feb 2013 08:04:30 -0800
diff --git a/css/style.css b/css/style.css
new file mode 100644
index 0000000..52afa3d
--- /dev/null
+++ b/css/style.css
@@ -0,0 +1,328 @@
+html, body {
+ height: 100%; }
+
+body {
+ font-family: Lucida Grande, Verdana, Arial, Helvetica, sans-serif;
+ font-size: 90%;
+ margin: 0;
+ padding: 0;
+ background: white;
+ color: black; }
+
+#wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -43px; }
+
+#footer-push {
+ height: 43px; }
+
+div.header, #footer {
+ background: #eeeeee; }
+
+#footer {
+ border-top: 1px solid silver;
+ margin-top: 12px;
+ padding: 0 2em;
+ line-height: 30px;
+ text-align: center;
+ font-variant: small-caps;
+ font-size: 95%; }
+
+.clearing:after {
+ content: ".";
+ visibility: hidden;
+ height: 0;
+ display: block;
+ clear: both; }
+* html .clearing {
+ height: 1px; }
+.clearing *:first-child + html {
+ overflow: hidden; }
+
+h1, h2, h3, h4, h5, h6 {
+ margin: 0;
+ font-weight: normal; }
+
+a {
+ color: #0b3e71; }
+ a:hover {
+ background: #336699;
+ text-decoration: none;
+ color: #eeeeff; }
+
+#diagram img {
+ border: 0; }
+
+#description a, .method .description a, .header a {
+ color: #336699; }
+ #description a:hover, .method .description a:hover, .header a:hover {
+ color: #eeeeee; }
+#description h1 a, #description h2 a, #description h3 a, #description h4 a, #description h5 a, #description h6 a, .method .description h1 a, .method .description h2 a, .method .description h3 a, .method .description h4 a, .method .description h5 a, .method .description h6 a, .header h1 a, .header h2 a, .header h3 a, .header h4 a, .header h5 a, .header h6 a {
+ color: #0b3e71; }
+
+ol {
+ margin: 0;
+ padding: 0;
+ list-style: none; }
+ ol li {
+ margin-left: 0;
+ white-space: nowrap; }
+ ol li.other {
+ display: none; }
+
+ol.expanded li.other {
+ display: list-item; }
+
+table {
+ margin-bottom: 1em;
+ font-size: 1em;
+ border-collapse: collapse; }
+ table td, table th {
+ padding: 0.4em 0.8em; }
+ table thead {
+ background-color: #e8e8e8; }
+ table thead th {
+ font-variant: small-caps;
+ color: #666666; }
+ table tr {
+ border-bottom: 1px solid silver; }
+
+#index a.show, div.header a.show {
+ text-decoration: underline;
+ font-style: italic;
+ color: #666666; }
+ #index a.show:after, div.header a.show:after {
+ content: " ..."; }
+ #index a.show:hover, div.header a.show:hover {
+ color: black;
+ background: #ffffee; }
+
+#index {
+ font: 85%/1.2 Arial, Helvetica, sans-serif; }
+ #index a {
+ text-decoration: none; }
+ #index h1 {
+ padding: 0.2em 0.5em 0.1em;
+ background: #cccccc;
+ font: small-caps 1.2em Georgia, serif;
+ color: #333333;
+ border-bottom: 1px solid gray; }
+ #index form {
+ margin: 0;
+ padding: 0; }
+ #index form input {
+ margin: 0.4em 3px 0 0.4em;
+ width: 80%; }
+ #index form #search.untouched {
+ color: #777777; }
+ #index form .clear_button {
+ -moz-border-radius: 7px;
+ -webkit-border-radius: 7px;
+ background: #aaaaaa;
+ color: white;
+ padding: 0 5px 1px 5px;
+ cursor: pointer; }
+ #index ol {
+ padding: 0.4em 0.5em; }
+ #index ol li {
+ white-space: nowrap; }
+ #index #index-entries li a {
+ padding: 1px 2px; }
+ #index #index-entries.classes {
+ font-size: 1.1em; }
+ #index #index-entries.classes ol {
+ padding: 0; }
+ #index #index-entries.classes span.nodoc {
+ display: none; }
+ #index #index-entries.classes span.nodoc, #index #index-entries.classes a {
+ font-weight: bold; }
+ #index #index-entries.classes .parent {
+ font-weight: normal; }
+ #index #index-entries.methods li, #index #search-results.methods li {
+ margin-bottom: 0.2em; }
+ #index #index-entries.methods li a .method_name, #index #search-results.methods li a .method_name {
+ margin-right: 0.25em; }
+ #index #index-entries.methods li a .module_name, #index #search-results.methods li a .module_name {
+ color: #666666; }
+ #index #index-entries.methods li a:hover .module_name, #index #search-results.methods li a:hover .module_name {
+ color: #dddddd; }
+
+#attribute-list .context-item-name {
+ font-weight: bold; }
+
+div.header {
+ font-size: 80%;
+ padding: 0.5em 2%;
+ font-family: Arial, Helvetica, sans-serif;
+ border-bottom: 1px solid silver; }
+ div.header .name {
+ font-size: 1.6em;
+ font-family: Georgia, serif; }
+ div.header .name .type {
+ color: #666666;
+ font-size: 80%;
+ font-variant: small-caps; }
+ div.header h1.name {
+ font-size: 2.2em; }
+ div.header .paths, div.header .last-update, div.header .parent {
+ color: #666666; }
+ div.header .last-update .datetime {
+ color: #484848; }
+ div.header .parent {
+ margin-top: 0.3em; }
+ div.header .parent strong {
+ font-weight: normal;
+ color: #484848; }
+
+#content {
+ padding: 12px 2%; }
+ div.class #content {
+ position: relative;
+ width: 72%; }
+ #content pre, #content .method .synopsis {
+ font: 14px Monaco, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace; }
+ #content pre {
+ color: black;
+ background: #eeeeee;
+ border: 1px solid silver;
+ padding: 0.5em 0.8em;
+ overflow: auto; }
+ #content p code, #content p tt, #content li code, #content li tt, #content dl code, #content dl tt {
+ font: 14px Monaco, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
+ background: #ffffe3;
+ padding: 2px 3px;
+ line-height: 1.4; }
+ #content h1 code, #content h1 tt, #content h2 code, #content h2 tt, #content h3 code, #content h3 tt, #content h4 code, #content h4 tt, #content h5 code, #content h5 tt, #content h6 code, #content h6 tt {
+ font-size: 1.1em; }
+ #content #text {
+ position: relative; }
+ #content #description p {
+ margin-top: 0.5em; }
+ #content #description h1, #content #description h2, #content #description h3, #content #description h4, #content #description h5, #content #description h6 {
+ font-family: Georgia, serif; }
+ #content #description h1 {
+ font-size: 2.2em;
+ margin-bottom: 0.2em;
+ border-bottom: 3px double #d8d8d8;
+ padding-bottom: 0.1em; }
+ #content #description h2 {
+ font-size: 1.8em;
+ color: #0e3062;
+ margin: 0.8em 0 0.3em 0; }
+ #content #description h3 {
+ font-size: 1.6em;
+ margin: 0.8em 0 0.3em 0;
+ color: #666666; }
+ #content #description h4 {
+ font-size: 1.4em;
+ margin: 0.8em 0 0.3em 0; }
+ #content #description h5 {
+ font-size: 1.2em;
+ margin: 0.8em 0 0.3em 0;
+ color: #0e3062; }
+ #content #description h6 {
+ font-size: 1em;
+ margin: 0.8em 0 0.3em 0;
+ color: #666666; }
+ #content #description ul, #content #description ol, #content .method .description ul, #content .method .description ol {
+ margin: 0.8em 0;
+ padding-left: 1.5em; }
+ #content #description ol, #content .method .description ol {
+ list-style: decimal; }
+ #content #description ol li, #content .method .description ol li {
+ white-space: normal; }
+
+#method-list {
+ position: absolute;
+ top: 0px;
+ right: -33%;
+ width: 28%;
+ background: #eeeeee;
+ border: 1px solid silver;
+ padding: 0.4em 1%;
+ overflow: hidden; }
+ #method-list h2 {
+ font-size: 1.3em; }
+ #method-list h3 {
+ font-variant: small-caps;
+ text-transform: capitalize;
+ font-family: Georgia, serif;
+ color: #666666;
+ font-size: 1.1em; }
+ #method-list ol {
+ padding: 0 0 0.5em 0.5em; }
+
+#context {
+ border-top: 1px dashed silver;
+ margin-top: 1em;
+ margin-bottom: 1em; }
+
+#context h2, #section h2 {
+ font: small-caps 1.2em Georgia, serif;
+ color: #444444;
+ margin: 1em 0 0.2em 0; }
+
+#methods .method {
+ border: 1px solid silver;
+ margin-top: 0.5em;
+ background: #eeeeee; }
+ #methods .method .synopsis {
+ color: black;
+ background: silver;
+ padding: 0.2em 1em; }
+ #methods .method .synopsis .name {
+ font-weight: bold; }
+ #methods .method .synopsis a {
+ text-decoration: none; }
+ #methods .method .description {
+ padding: 0 1em; }
+ #methods .method .description pre {
+ background: #f8f8f8; }
+ #methods .method .source {
+ margin: 0.5em 0; }
+ #methods .method .source-toggle {
+ font-size: 85%;
+ margin-left: 1em; }
+#methods .public-class {
+ background: #ffffe4; }
+#methods .public-instance .synopsis {
+ color: #eeeeee;
+ background: #336699; }
+
+#content .method .source pre {
+ background: #262626;
+ color: #ffdead;
+ margin: 1em;
+ padding: 0.5em;
+ border: 1px dashed #999999;
+ overflow: auto; }
+ #content .method .source pre .ruby-constant {
+ color: #7fffd4;
+ background: transparent; }
+ #content .method .source pre .ruby-keyword {
+ color: aqua;
+ background: transparent; }
+ #content .method .source pre .ruby-ivar {
+ color: #eedd82;
+ background: transparent; }
+ #content .method .source pre .ruby-operator {
+ color: #00ffee;
+ background: transparent; }
+ #content .method .source pre .ruby-identifier {
+ color: #ffdead;
+ background: transparent; }
+ #content .method .source pre .ruby-node {
+ color: #ffa07a;
+ background: transparent; }
+ #content .method .source pre .ruby-comment {
+ color: #b22222;
+ font-weight: bold;
+ background: transparent; }
+ #content .method .source pre .ruby-regexp {
+ color: #ffa07a;
+ background: transparent; }
+ #content .method .source pre .ruby-value {
+ color: #7fffd4;
+ background: transparent; }
diff --git a/files/CHANGELOG_rdoc.html b/files/CHANGELOG_rdoc.html
deleted file mode 100644
index f15739d..0000000
--- a/files/CHANGELOG_rdoc.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html lang='en'>
- <head>
- <title>File: CHANGELOG.rdoc [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
- <script type='text/javascript'>
- //<![CDATA[
- function popupCode(url) {
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
- }
-
- function toggleCode(id) {
- var code = document.getElementById(id)
-
- code.style.display = code.style.display != 'block' ? 'block' : 'none'
- return true
- }
-
- // Make codeblocks hidden by default
- document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
- //]]>
- </script>
- </head>
- <body class='page'>
- <div class='file' id='wrapper'>
- <div class='header'>
- <h1 class='name'>CHANGELOG.rdoc</h1>
- <div class='paths'>
- CHANGELOG.rdoc
- </div>
- <div class='last-update'>
- Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
- </div>
- </div>
- <div id='content'>
- <div id='text'>
- <div id='description'>
- <h3>1.1 / 3 Apr 2011</h3>
- <ul>
- <li>Rescue Timeout::Error so :on_error works as expected when server is
- unavailable. [Joel Watson]
-
- </li>
- </ul>
- <h3>1.0.1 / 1 Feb 2009</h3>
- <ul>
- <li>Remove redundant call to block_given? in Session#group [paddor]
-
- </li>
- <li>Add Channel#on_open_failed callback hook [Jamis Buck]
-
- </li>
- </ul>
- <h3>1.0.0 / 1 May 2008</h3>
- <ul>
- <li>(no changes since the last preview release)
-
- </li>
- </ul>
- <h3>1.0 Preview Release 2 (0.99.1) / 19 Apr 2008</h3>
- <ul>
- <li>Don&#8217;t try to select on closed IO streams [Jamis Buck]
-
- </li>
- </ul>
- <h3>1.0 Preview Release 1 (0.99.0) / 10 Apr 2008</h3>
- <ul>
- <li>First release of <a
- href="../classes/Net/SSH/Multi.html">Net::SSH::Multi</a>
-
- </li>
- </ul>
- </div>
- <div id='section'>
- </div>
- </div>
- </div>
- <div id='footer-push'></div>
- </div>
- <div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
- </div>
- </body>
-</html>
diff --git a/files/CHANGES_txt.html b/files/CHANGES_txt.html
new file mode 100644
index 0000000..1b9cd37
--- /dev/null
+++ b/files/CHANGES_txt.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html lang='en'>
+ <head>
+ <title>CHANGES.txt</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../css/style.css' media='screen' rel='stylesheet' type='text/css'>
+ <script type='text/javascript'>
+ //<![CDATA[
+ function popupCode(url) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode(id) {
+ var code = document.getElementById(id)
+
+ code.style.display = code.style.display != 'block' ? 'block' : 'none'
+ return true
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
+ //]]>
+ </script>
+ </head>
+ <body class='page'>
+ <div class='file' id='wrapper'>
+ <div class='header'>
+ <h1 class='name'>CHANGES.txt</h1>
+ <div class='paths'>
+ CHANGES.txt
+ </div>
+ <div class='last-update'>
+ Last Update:
+ <span class='datetime'>2013-02-06 08:04:30 -0800</span>
+ </div>
+ </div>
+ <div id='content'>
+ <div id='text'>
+ <div id='description'>
+
+ <h3 id="label-1.1.1+%2F+06+Feb+2013">1.1.1 / 06 Feb 2013</h3>
+ <ul><li>
+ <p>Added public cert. All gem releases are now signed. See INSTALL in readme.</p>
+ </li></ul>
+
+ <h3 id="label-1.1+%2F+3+Apr+2011">1.1 / 3 Apr 2011</h3>
+ <ul><li>
+ <p>Rescue Timeout::Error so :on_error works as expected when server is
+ unavailable. [Joel Watson]</p>
+ </li></ul>
+
+ <h3 id="label-1.0.1+%2F+1+Feb+2009">1.0.1 / 1 Feb 2009</h3>
+ <ul><li>
+ <p>Remove redundant call to block_given? in Session#group [paddor]</p>
+ </li><li>
+ <p>Add Channel#on_open_failed callback hook [Jamis Buck]</p>
+ </li></ul>
+
+ <h3 id="label-1.0.0+%2F+1+May+2008">1.0.0 / 1 May 2008</h3>
+ <ul><li>
+ <p>(no changes since the last preview release)</p>
+ </li></ul>
+
+ <h3 id="label-1.0+Preview+Release+2+%280.99.1%29+%2F+19+Apr+2008">1.0 Preview Release 2 (0.99.1) / 19 Apr 2008</h3>
+ <ul><li>
+ <p>Don't try to select on closed IO streams [Jamis Buck]</p>
+ </li></ul>
+
+ <h3 id="label-1.0+Preview+Release+1+%280.99.0%29+%2F+10+Apr+2008">1.0 Preview Release 1 (0.99.0) / 10 Apr 2008</h3>
+ <ul><li>
+ <p>First release of <a
+ href="../classes/Net/SSH/Multi.html">Net::SSH::Multi</a></p>
+ </li></ul>
+ </div>
+ <div id='context'>
+ </div>
+ </div>
+ </div>
+ <div id='footer-push'></div>
+ </div>
+ <div id='footer'>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ </div>
+ </body>
+</html>
diff --git a/files/README_rdoc.html b/files/README_rdoc.html
index 2902082..32a89b7 100644
--- a/files/README_rdoc.html
+++ b/files/README_rdoc.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: README.rdoc [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>README.rdoc</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -25,132 +25,140 @@
<body class='page'>
<div class='file' id='wrapper'>
<div class='header'>
- <div class='name'>README.rdoc</div>
+ <h1 class='name'>README.rdoc</h1>
<div class='paths'>
README.rdoc
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:30 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
- <h1><a href="../classes/Net/SSH/Multi.html">Net::SSH::Multi</a></h1>
- <ul>
- <li><a
- href="http://net-ssh.rubyforge.org/multi">net-ssh.rubyforge.org/multi</a>
-
- </li>
- </ul>
- <h2>DESCRIPTION:</h2>
- <p>
- <a href="../classes/Net/SSH/Multi.html">Net::SSH::Multi</a> is a library
+
+ <h1 id="label-Net%3A%3ASSH%3A%3AMulti"><a href="../classes/Net/SSH/Multi.html">Net::SSH::Multi</a></h1>
+ <ul><li>
+ <p>Docs: <a
+ href="http://net-ssh.github.com/net-ssh-multi">net-ssh.github.com/net-ssh-multi</a></p>
+ </li><li>
+ <p>Issues: <a
+ href="https://github.com/net-ssh/net-ssh-multi/issues">github.com/net-ssh/net-ssh-multi/issues</a></p>
+ </li><li>
+ <p>Codes: <a
+ href="https://github.com/net-ssh/net-ssh-multi">github.com/net-ssh/net-ssh-multi</a></p>
+ </li><li>
+ <p>Email: net-ssh@solutious.com</p>
+ </li></ul>
+
+ <p><em>As of v1.1.1, all gem releases are signed. See INSTALL.</em></p>
+
+ <h2 id="label-DESCRIPTION%3A">DESCRIPTION:</h2>
+
+ <p><a href="../classes/Net/SSH/Multi.html">Net::SSH::Multi</a> is a library
for controlling multiple <a href="../classes/Net/SSH.html">Net::SSH</a>
connections via a single interface. It exposes an API similar to that of
Net::SSH::Connection::Session and Net::SSH::Connection::Channel, making it
simpler to adapt programs designed for single connections to be used with
- multiple connections.
- </p>
- <p>
- This library is particularly useful for automating repetitive tasks that
+ multiple connections.</p>
+
+ <p>This library is particularly useful for automating repetitive tasks that
must be performed on multiple machines. It executes the commands in
parallel, and allows commands to be executed on subsets of servers (defined
- by groups).
- </p>
- <h2>FEATURES:</h2>
- <ul>
- <li>Easily manage multiple connections
-
- </li>
- <li>Open channels, spawn processes, etc. on multiple connections in parallel
-
- </li>
- <li>Transparently limit concurrent connections when dealing with large numbers
- of servers (Net::SSH::Multi::Session#concurrent_connections)
-
- </li>
- <li>Specify a default gateway machine through which connections should be
- tunneled, or even specify a different gateway machine for each server
-
- </li>
- </ul>
- <h2>SYNOPSIS:</h2>
- <p>
- In a nutshell:
- </p>
- <pre>require 'net/ssh/multi'&#x000A;&#x000A;Net::SSH::Multi.start do |session|&#x000A; # access servers via a gateway&#x000A; session.via 'gateway', 'gateway-user'&#x000A;&#x000A; # define the servers we want to use&#x000A; session.use 'user1@host1'&#x000A; session.use 'user2@host2'&#x000A;&#x000A; # define servers in groups for more granular access&#x000A; session.group :app do&#x000A; session.use 'user@app1'&#x000A; session.use 'user@app2'&#x000A; end&#x000A;&#x000A; # execute commands on all servers&#x000A; session.exec &quot;uptime&quot;&#x000A;&#x000A; # execute commands on a subset of servers&#x000A; session.with(:app).exec &quot;hostname&quot;&#x000A;&#x000A; # run the aggregated event loop&#x000A; session.loop&#x000A;end</pre>
- <p>
- See <a
+ by groups).</p>
+
+ <h2 id="label-FEATURES%3A">FEATURES:</h2>
+ <ul><li>
+ <p>Easily manage multiple connections</p>
+ </li><li>
+ <p>Open channels, spawn processes, etc. on multiple connections in parallel</p>
+ </li><li>
+ <p>Transparently limit concurrent connections when dealing with large numbers
+ of servers (<a
+ href="../classes/Net/SSH/Multi/Session.html#attribute-i-concurrent_connections">Net::SSH::Multi::Session#concurrent_connections</a>)</p>
+ </li><li>
+ <p>Specify a default gateway machine through which connections should be
+ tunneled, or even specify a different gateway machine for each server</p>
+ </li></ul>
+
+ <h2 id="label-SYNOPSIS%3A">SYNOPSIS:</h2>
+
+ <p>In a nutshell:</p>
+
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'net/ssh/multi'</span>&#x000A;&#x000A;<span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">SSH</span><span class="ruby-operator">::</span><span class="ruby-constant">Multi</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">session</span><span class="ruby-operator">|</span>&#x000A; <span class="ruby-comment"># access servers via a gateway</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">via</span> <span class="ruby-string">'gateway'</span>, <span class="ruby-string">'gateway-user'</span>&#x000A;&#x000A; <span class="ruby-comment"># define the servers we want to use</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user1@host1'</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user2@host2'</span>&#x000A;&#x000A; <span class="ruby-comment"># define servers in groups for more granular access</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">group</span> :<span class="ruby-identifier">app</span> <span class="ruby-keyword">do</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user@app1'</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">use</span> <span class="ruby-string">'user@app2'</span>&#x000A; <span class="ruby-keyword">end</span>&#x000A;&#x000A; <span class="ruby-comment"># execute commands on all servers</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">exec</span> <span class="ruby-string">&quot;uptime&quot;</span>&#x000A;&#x000A; <span class="ruby-comment"># execute commands on a subset of servers</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">with</span>(:<span class="ruby-identifier">app</span>).<span class="ruby-identifier">exec</span> <span class="ruby-string">&quot;hostname&quot;</span>&#x000A;&#x000A; <span class="ruby-comment"># run the aggregated event loop</span>&#x000A; <span class="ruby-identifier">session</span>.<span class="ruby-identifier">loop</span>&#x000A;<span class="ruby-keyword">end</span></pre>
+
+ <p>See <a
href="../classes/Net/SSH/Multi/Session.html">Net::SSH::Multi::Session</a>
- for more documentation.
- </p>
- <h2>REQUIREMENTS:</h2>
- <ul>
- <li>net-ssh (version 2)
-
- </li>
- <li>net-ssh-gateway
-
- </li>
- </ul>
- <p>
- If you want to run the tests or use any of the Rake tasks, you&#8217;ll
- need:
- </p>
- <ul>
- <li>Echoe (for the Rakefile)
-
- </li>
- <li>Mocha (for the tests)
-
- </li>
- </ul>
- <h2>INSTALL:</h2>
- <ul>
- <li>gem install net-ssh-multi (might need sudo privileges)
-
- </li>
- </ul>
- <h2>LICENSE:</h2>
- <p>
- (The MIT License)
- </p>
- <p>
- Copyright &#169; 2008 Jamis Buck <jamis@37signals.com>
- </p>
- <p>
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the
- &#8216;Software&#8217;), to deal in the Software without restriction,
- including without limitation the rights to use, copy, modify, merge,
- publish, distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to the
- following conditions:
- </p>
- <p>
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- </p>
- <p>
- THE SOFTWARE IS PROVIDED &#8216;AS IS&#8217;, WITHOUT WARRANTY OF ANY KIND,
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- USE OR OTHER DEALINGS IN THE SOFTWARE.
- </p>
+ for more documentation.</p>
+
+ <h2 id="label-REQUIREMENTS%3A">REQUIREMENTS:</h2>
+ <ul><li>
+ <p>net-ssh (version 2)</p>
+ </li><li>
+ <p>net-ssh-gateway</p>
+ </li></ul>
+
+ <p>If you want to run the tests or use any of the Rake tasks, you'll need:</p>
+ <ul><li>
+ <p>Echoe (for the Rakefile)</p>
+ </li><li>
+ <p>Mocha (for the tests)</p>
+ </li></ul>
+
+ <h2 id="label-INSTALL%3A">INSTALL:</h2>
+ <ul><li>
+ <p>gem install net-ssh-multi</p>
+ </li></ul>
+
+ <p>However, in order to be sure the code you're installing hasn't been
+ tampered with, it's recommended that you verify the <a
+ href="http://docs.rubygems.org/read/chapter/21">signiture</a>. To do this,
+ you need to add my public key as a trusted certificate (you only need to do
+ this once):</p>
+
+ <pre># Add the public key as a trusted certificate&#x000A;# (You only need to do this once)&#x000A;$ curl -O https://raw.github.com/net-ssh/net-ssh/master/gem-public_cert.pem&#x000A;$ gem cert --add gem-public_cert.pem</pre>
+
+ <p>Then, when install the gem, do so with high security:</p>
+
+ <pre>$ gem install net-ssh-multi -P HighSecurity</pre>
+
+ <p>If you don't add the public key, you'll see an error like "Couldn't verify
+ data signature". If you're still having trouble let me know and I'll give
+ you a hand.</p>
+
+ <h2 id="label-LICENSE%3A">LICENSE:</h2>
+
+ <p>(The MIT License)</p>
+
+ <p>Copyright (c) 2008 Jamis Buck &lt;jamis@37signals.com&gt;</p>
+
+ <p>Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the 'Software'),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:</p>
+
+ <p>The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.</p>
+
+ <p>THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.</p>
</div>
- <div id='section'>
+ <div id='context'>
</div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/channel_proxy_rb.html b/files/lib/net/ssh/multi/channel_proxy_rb.html
index d81fa97..0b3783d 100644
--- a/files/lib/net/ssh/multi/channel_proxy_rb.html
+++ b/files/lib/net/ssh/multi/channel_proxy_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: channel_proxy.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>channel_proxy.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,19 +31,20 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
- <div id='section'>
+ <div id='description'></div>
+ <div id='context'>
</div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/channel_rb.html b/files/lib/net/ssh/multi/channel_rb.html
index 47dadd8..fb6ce2f 100644
--- a/files/lib/net/ssh/multi/channel_rb.html
+++ b/files/lib/net/ssh/multi/channel_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: channel.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>channel.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,19 +31,20 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
- <div id='section'>
+ <div id='description'></div>
+ <div id='context'>
</div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/dynamic_server_rb.html b/files/lib/net/ssh/multi/dynamic_server_rb.html
index 6fb1cd8..d727b5c 100644
--- a/files/lib/net/ssh/multi/dynamic_server_rb.html
+++ b/files/lib/net/ssh/multi/dynamic_server_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: dynamic_server.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>dynamic_server.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,11 +31,12 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
<div id='context'>
<div id='requires'>
<h2>Required files</h2>
@@ -44,14 +45,12 @@
</ol>
</div>
</div>
- <div id='section'>
- </div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/pending_connection_rb.html b/files/lib/net/ssh/multi/pending_connection_rb.html
index 47a3452..61a73d7 100644
--- a/files/lib/net/ssh/multi/pending_connection_rb.html
+++ b/files/lib/net/ssh/multi/pending_connection_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: pending_connection.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>pending_connection.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,11 +31,12 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
<div id='context'>
<div id='requires'>
<h2>Required files</h2>
@@ -44,14 +45,12 @@
</ol>
</div>
</div>
- <div id='section'>
- </div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/server_list_rb.html b/files/lib/net/ssh/multi/server_list_rb.html
index 0ebda50..67ce4f6 100644
--- a/files/lib/net/ssh/multi/server_list_rb.html
+++ b/files/lib/net/ssh/multi/server_list_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: server_list.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>server_list.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,11 +31,12 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
<div id='context'>
<div id='requires'>
<h2>Required files</h2>
@@ -45,14 +46,12 @@
</ol>
</div>
</div>
- <div id='section'>
- </div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/server_rb.html b/files/lib/net/ssh/multi/server_rb.html
index 5f03c59..0e89d67 100644
--- a/files/lib/net/ssh/multi/server_rb.html
+++ b/files/lib/net/ssh/multi/server_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: server.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>server.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,11 +31,12 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
<div id='context'>
<div id='requires'>
<h2>Required files</h2>
@@ -44,14 +45,12 @@
</ol>
</div>
</div>
- <div id='section'>
- </div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/session_actions_rb.html b/files/lib/net/ssh/multi/session_actions_rb.html
index 2244580..8d293af 100644
--- a/files/lib/net/ssh/multi/session_actions_rb.html
+++ b/files/lib/net/ssh/multi/session_actions_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: session_actions.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>session_actions.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,19 +31,20 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
- <div id='section'>
+ <div id='description'></div>
+ <div id='context'>
</div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/session_rb.html b/files/lib/net/ssh/multi/session_rb.html
index bfc072e..433d2f8 100644
--- a/files/lib/net/ssh/multi/session_rb.html
+++ b/files/lib/net/ssh/multi/session_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: session.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>session.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,11 +31,12 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
<div id='context'>
<div id='requires'>
<h2>Required files</h2>
@@ -52,14 +53,12 @@
</ol>
</div>
</div>
- <div id='section'>
- </div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/subsession_rb.html b/files/lib/net/ssh/multi/subsession_rb.html
index 0e2a9f3..0ab9994 100644
--- a/files/lib/net/ssh/multi/subsession_rb.html
+++ b/files/lib/net/ssh/multi/subsession_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: subsession.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>subsession.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,11 +31,12 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
<div id='context'>
<div id='requires'>
<h2>Required files</h2>
@@ -44,14 +45,12 @@
</ol>
</div>
</div>
- <div id='section'>
- </div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi/version_rb.html b/files/lib/net/ssh/multi/version_rb.html
index 7a91902..d6cbf89 100644
--- a/files/lib/net/ssh/multi/version_rb.html
+++ b/files/lib/net/ssh/multi/version_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: version.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>version.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,11 +31,12 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
<div id='context'>
<div id='requires'>
<h2>Required files</h2>
@@ -44,14 +45,12 @@
</ol>
</div>
</div>
- <div id='section'>
- </div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/files/lib/net/ssh/multi_rb.html b/files/lib/net/ssh/multi_rb.html
index 99bc554..01b090b 100644
--- a/files/lib/net/ssh/multi_rb.html
+++ b/files/lib/net/ssh/multi_rb.html
@@ -1,9 +1,9 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>File: multi.rb [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='../../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title>multi.rb</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='../../../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
@@ -31,11 +31,12 @@
</div>
<div class='last-update'>
Last Update:
- <span class='datetime'>2011-04-03 16:38:48 -0400</span>
+ <span class='datetime'>2013-02-06 08:04:22 -0800</span>
</div>
</div>
<div id='content'>
<div id='text'>
+ <div id='description'></div>
<div id='context'>
<div id='requires'>
<h2>Required files</h2>
@@ -44,14 +45,12 @@
</ol>
</div>
</div>
- <div id='section'>
- </div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
- <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
+ <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>
diff --git a/fr_class_index.html b/fr_class_index.html
index 32489bb..1dcaee2 100644
--- a/fr_class_index.html
+++ b/fr_class_index.html
@@ -1,19 +1,39 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>Classes [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title></title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='css/style.css' media='screen' rel='stylesheet' type='text/css'>
<base target='docwin'>
</head>
<body class='list'>
<div id='index'>
- <h1>Classes</h1>
+ <h1>Class Index</h1>
<ol class='classes' id='index-entries'>
- <li><a href="classes/Net.html">Net</a>
- <ol><li><a href="classes/Net/SSH.html"><span class="parent">Net::</span>SSH</a>
- <ol><li><a href="classes/Net/SSH/Multi.html"><span class="parent">Net::SSH::</span>Multi</a>
- <ol><li><a href="classes/Net/SSH/Multi/Channel.html"><span class="parent">Net::SSH::Multi::</span>Channel</a></li><li><a href="classes/Net/SSH/Multi/ChannelProxy.html"><span class="parent">Net::SSH::Multi::</span>ChannelProxy</a></li><li><a href="classes/Net/SSH/Multi/DynamicServer.html"><span class="parent">Net::SSH::Multi::</span>DynamicServer</a></li><li><a href="classes/Net/SSH/Multi/PendingConnection.html"><span class="parent">Net::SSH::Multi::</span>PendingConnection</a></li><li><a href="classes/Net/SSH/Multi/Server.html"><span class="parent">Net::SSH::Multi::</span>Server</a></li><li><a href="classes/Net/SSH/Multi/ServerList.html"><span class="parent">Net::SSH::Multi::</span>ServerList</a></li><li><a href="classes/Net/SSH/Multi/Session.html"><span class="parent">Net::SSH::Multi::</span>Session</a></li><li><a href="classes/Net/SSH/Multi/SessionActions.html"><span class="parent">Net::SSH::Multi::</span>SessionActions</a></li><li><a href="classes/Net/SSH/Multi/Subsession.html"><span class="parent">Net::SSH::Multi::</span>Subsession</a></li><li><a href="classes/Net/SSH/Multi/Version.html"><span class="parent">Net::SSH::Multi::</span>Version</a></li>
+ <li><a target="docwin" href="classes/Net.html">Net</a>
+ <ol><li><a target="docwin" href="classes/Net/SSH.html"><span class="parent">Net::</span>SSH</a>
+ <ol><li><a target="docwin" href="classes/Net/SSH/Multi.html"><span class="parent">Net::SSH::</span>Multi</a>
+ <ol><li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html"><span class="parent">Net::SSH::Multi::</span>Channel</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html"><span class="parent">Net::SSH::Multi::</span>ChannelProxy</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html"><span class="parent">Net::SSH::Multi::</span>DynamicServer</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html"><span class="parent">Net::SSH::Multi::</span>PendingConnection</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/Server.html"><span class="parent">Net::SSH::Multi::</span>Server</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/ServerList.html"><span class="parent">Net::SSH::Multi::</span>ServerList</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/Session.html"><span class="parent">Net::SSH::Multi::</span>Session</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html"><span class="parent">Net::SSH::Multi::</span>SessionActions</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/Subsession.html"><span class="parent">Net::SSH::Multi::</span>Subsession</a>
+ <ol>
+ </ol></li><li><a target="docwin" href="classes/Net/SSH/Multi/Version.html"><span class="parent">Net::SSH::Multi::</span>Version</a>
+ <ol>
+ </ol></li>
</ol></li>
</ol></li>
</ol></li>
diff --git a/fr_file_index.html b/fr_file_index.html
index 2ecd47b..21d6fdd 100644
--- a/fr_file_index.html
+++ b/fr_file_index.html
@@ -1,28 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>Files [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title></title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='css/style.css' media='screen' rel='stylesheet' type='text/css'>
<base target='docwin'>
</head>
<body class='list'>
<div id='index'>
- <h1>Files</h1>
+ <h1>File Index</h1>
<ol class='files' id='index-entries'>
- <li><a href="files/CHANGELOG_rdoc.html">CHANGELOG.rdoc</a></li>
- <li><a href="files/README_rdoc.html">README.rdoc</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi_rb.html">lib/net/ssh/multi.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/channel_rb.html">lib/net/ssh/multi/channel.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/channel_proxy_rb.html">lib/net/ssh/multi/channel_proxy.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/dynamic_server_rb.html">lib/net/ssh/multi/dynamic_server.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/pending_connection_rb.html">lib/net/ssh/multi/pending_connection.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/server_rb.html">lib/net/ssh/multi/server.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/server_list_rb.html">lib/net/ssh/multi/server_list.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/session_rb.html">lib/net/ssh/multi/session.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/session_actions_rb.html">lib/net/ssh/multi/session_actions.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/subsession_rb.html">lib/net/ssh/multi/subsession.rb</a></li>
- <li class='other'><a href="files/lib/net/ssh/multi/version_rb.html">lib/net/ssh/multi/version.rb</a></li>
+ <li><a target="docwin" href="files/CHANGES_txt.html">CHANGES.txt</a></li>
+ <li><a target="docwin" href="files/README_rdoc.html">README.rdoc</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi_rb.html">multi.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/channel_rb.html">channel.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/channel_proxy_rb.html">channel_proxy.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/dynamic_server_rb.html">dynamic_server.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/pending_connection_rb.html">pending_connection.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/server_rb.html">server.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/server_list_rb.html">server_list.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/session_rb.html">session.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/session_actions_rb.html">session_actions.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/subsession_rb.html">subsession.rb</a></li>
+ <li class='other'><a target="docwin" href="files/lib/net/ssh/multi/version_rb.html">version.rb</a></li>
<li>
<a class='show' href='#' onclick='this.parentNode.parentNode.className += " expanded"; this.parentNode.removeChild(this); return false'>show all</a>
</li>
diff --git a/fr_method_index.html b/fr_method_index.html
index 9d6f6c9..09b5102 100644
--- a/fr_method_index.html
+++ b/fr_method_index.html
@@ -1,14 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
- <title>Methods [Control multiple Net::SSH connections via a single interface.]</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
- <link href='rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
+ <title></title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
+ <link href='css/style.css' media='screen' rel='stylesheet' type='text/css'>
<base target='docwin'>
</head>
<body class='list'>
<div id='index'>
- <h1>Methods</h1>
+ <h1>Method Index</h1>
<script type='text/javascript'>
/* Prototype JavaScript framework, version 1.6.0.3
* (c) 2005-2008 Sam Stephenson
@@ -4331,86 +4331,107 @@
Element.addMethods();
var search_index = [
- { method: '<=>', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000050"><span class="method_name">&lt;=&gt;</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: '[]', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000011"><span class="method_name">[]</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: '[]', module: 'net::ssh::multi::dynamicserver', html: '<a href="classes/Net/SSH/Multi/DynamicServer.html#M000031"><span class="method_name">[]</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
- { method: '[]', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000047"><span class="method_name">[]</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: '[]=', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000048"><span class="method_name">[]=</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: '[]=', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000012"><span class="method_name">[]=</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: '[]=', module: 'net::ssh::multi::dynamicserver', html: '<a href="classes/Net/SSH/Multi/DynamicServer.html#M000032"><span class="method_name">[]=</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
- { method: 'active?', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000016"><span class="method_name">active?</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'add', module: 'net::ssh::multi::serverlist', html: '<a href="classes/Net/SSH/Multi/ServerList.html#M000060"><span class="method_name">add</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
- { method: 'busy?', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000057"><span class="method_name">busy?</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'busy?', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000040"><span class="method_name">busy?</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'busy?', module: 'net::ssh::multi::sessionactions', html: '<a href="classes/Net/SSH/Multi/SessionActions.html#M000004"><span class="method_name">busy?</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
- { method: 'channels', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000042"><span class="method_name">channels</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'close', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000074"><span class="method_name">close</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'close', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000018"><span class="method_name">close</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'close', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000041"><span class="method_name">close</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'close', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000058"><span class="method_name">close</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'concat', module: 'net::ssh::multi::serverlist', html: '<a href="classes/Net/SSH/Multi/ServerList.html#M000061"><span class="method_name">concat</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
- { method: 'connect!', module: 'net::ssh::multi::sessionactions', html: '<a href="classes/Net/SSH/Multi/SessionActions.html#M000003"><span class="method_name">connect!</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
- { method: 'delegate_to', module: 'net::ssh::multi::channelproxy', html: '<a href="classes/Net/SSH/Multi/ChannelProxy.html#M000028"><span class="method_name">delegate_to</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a>' },
- { method: 'each', module: 'net::ssh::multi::dynamicserver', html: '<a href="classes/Net/SSH/Multi/DynamicServer.html#M000033"><span class="method_name">each</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
- { method: 'each', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000010"><span class="method_name">each</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'each', module: 'net::ssh::multi::serverlist', html: '<a href="classes/Net/SSH/Multi/ServerList.html#M000062"><span class="method_name">each</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
- { method: 'eof!', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000019"><span class="method_name">eof!</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'evaluate!', module: 'net::ssh::multi::dynamicserver', html: '<a href="classes/Net/SSH/Multi/DynamicServer.html#M000034"><span class="method_name">evaluate!</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
- { method: 'exec', module: 'net::ssh::multi::sessionactions', html: '<a href="classes/Net/SSH/Multi/SessionActions.html#M000008"><span class="method_name">exec</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
- { method: 'exec', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000013"><span class="method_name">exec</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'fail!', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000055"><span class="method_name">fail!</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'failed?', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000054"><span class="method_name">failed?</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'first', module: 'net::ssh::multi::subsession', html: '<a href="classes/Net/SSH/Multi/Subsession.html#M000080"><span class="method_name">first</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a>' },
- { method: 'flatten', module: 'net::ssh::multi::serverlist', html: '<a href="classes/Net/SSH/Multi/ServerList.html#M000064"><span class="method_name">flatten</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
- { method: 'group', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000067"><span class="method_name">group</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'hash', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000051"><span class="method_name">hash</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'inspect', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000053"><span class="method_name">inspect</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'listeners', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000045"><span class="method_name">listeners</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'loop', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000075"><span class="method_name">loop</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'loop_forever', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000076"><span class="method_name">loop_forever</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'master', module: 'net::ssh::multi::sessionactions', html: '<a href="classes/Net/SSH/Multi/SessionActions.html#M000002"><span class="method_name">master</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
- { method: 'method_missing', module: 'net::ssh::multi::channelproxy', html: '<a href="classes/Net/SSH/Multi/ChannelProxy.html#M000029"><span class="method_name">method_missing</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a>' },
- { method: 'new', module: 'net::ssh::multi::serverlist', html: '<a href="classes/Net/SSH/Multi/ServerList.html#M000059"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
- { method: 'new', module: 'net::ssh::multi::channelproxy', html: '<a href="classes/Net/SSH/Multi/ChannelProxy.html#M000027"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a>' },
- { method: 'new', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000036"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'new', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000066"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'new', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000009"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'new', module: 'net::ssh::multi::subsession', html: '<a href="classes/Net/SSH/Multi/Subsession.html#M000078"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a>' },
- { method: 'new', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000046"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'new', module: 'net::ssh::multi::dynamicserver', html: '<a href="classes/Net/SSH/Multi/DynamicServer.html#M000030"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
- { method: 'on', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000073"><span class="method_name">on</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'on_close', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000023"><span class="method_name">on_close</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'on_data', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000020"><span class="method_name">on_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'on_eof', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000024"><span class="method_name">on_eof</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'on_extended_data', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000021"><span class="method_name">on_extended_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'on_open_failed', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000025"><span class="method_name">on_open_failed</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'on_process', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000022"><span class="method_name">on_process</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'on_request', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000026"><span class="method_name">on_request</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'open_channel', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000038"><span class="method_name">open_channel</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'open_channel', module: 'net::ssh::multi::sessionactions', html: '<a href="classes/Net/SSH/Multi/SessionActions.html#M000007"><span class="method_name">open_channel</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
- { method: 'port', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000049"><span class="method_name">port</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'postprocess', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000044"><span class="method_name">postprocess</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'preprocess', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000043"><span class="method_name">preprocess</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'process', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000077"><span class="method_name">process</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'replace_with', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000037"><span class="method_name">replace_with</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'request_pty', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000014"><span class="method_name">request_pty</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'select', module: 'net::ssh::multi::serverlist', html: '<a href="classes/Net/SSH/Multi/ServerList.html#M000063"><span class="method_name">select</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
- { method: 'send_data', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000015"><span class="method_name">send_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'send_global_request', module: 'net::ssh::multi::sessionactions', html: '<a href="classes/Net/SSH/Multi/SessionActions.html#M000006"><span class="method_name">send_global_request</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
- { method: 'send_global_request', module: 'net::ssh::multi::pendingconnection', html: '<a href="classes/Net/SSH/Multi/PendingConnection.html#M000039"><span class="method_name">send_global_request</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
- { method: 'servers', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000070"><span class="method_name">servers</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'servers_for', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000071"><span class="method_name">servers_for</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'session', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000056"><span class="method_name">session</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'sessions', module: 'net::ssh::multi::sessionactions', html: '<a href="classes/Net/SSH/Multi/SessionActions.html#M000005"><span class="method_name">sessions</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
- { method: 'slice', module: 'net::ssh::multi::subsession', html: '<a href="classes/Net/SSH/Multi/Subsession.html#M000079"><span class="method_name">slice</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a>' },
- { method: 'start', module: 'net::ssh::multi', html: '<a href="classes/Net/SSH/Multi.html#M000001"><span class="method_name">start</span> <span class="module_name">(Net::SSH::Multi)</span></a>' },
- { method: 'to_ary', module: 'net::ssh::multi::dynamicserver', html: '<a href="classes/Net/SSH/Multi/DynamicServer.html#M000035"><span class="method_name">to_ary</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
- { method: 'to_ary', module: 'net::ssh::multi::serverlist', html: '<a href="classes/Net/SSH/Multi/ServerList.html#M000065"><span class="method_name">to_ary</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
- { method: 'to_s', module: 'net::ssh::multi::server', html: '<a href="classes/Net/SSH/Multi/Server.html#M000052"><span class="method_name">to_s</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
- { method: 'use', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000069"><span class="method_name">use</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'via', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000068"><span class="method_name">via</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
- { method: 'wait', module: 'net::ssh::multi::channel', html: '<a href="classes/Net/SSH/Multi/Channel.html#M000017"><span class="method_name">wait</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
- { method: 'with', module: 'net::ssh::multi::session', html: '<a href="classes/Net/SSH/Multi/Session.html#M000072"><span class="method_name">with</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'new', module: 'net::ssh::multi::channelproxy', html: '<a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a>' },
+ { method: 'new', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'new', module: 'net::ssh::multi::subsession', html: '<a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a>' },
+ { method: 'new', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'new', module: 'net::ssh::multi::serverlist', html: '<a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
+ { method: 'new', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'new', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'new', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: 'start', module: 'net::ssh::multi', html: '<a target="docwin" href="classes/Net/SSH/Multi.html#method-c-start"><span class="method_name">::start</span> <span class="module_name">(Net::SSH::Multi)</span></a>' },
+ { method: '<=>', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-3C-3D-3E"><span class="method_name">#&lt;=&gt;</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: '[]', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-5B-5D"><span class="method_name">#[]</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: '[]', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-5B-5D"><span class="method_name">#[]</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: '[]', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-5B-5D"><span class="method_name">#[]</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: '[]=', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-5B-5D-3D"><span class="method_name">#[]=</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: '[]=', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-5B-5D-3D"><span class="method_name">#[]=</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: '[]=', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-5B-5D-3D"><span class="method_name">#[]=</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'active?', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-active-3F"><span class="method_name">#active?</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'add', module: 'net::ssh::multi::serverlist', html: '<a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-add"><span class="method_name">#add</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
+ { method: 'busy?', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-busy-3F"><span class="method_name">#busy?</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'busy?', module: 'net::ssh::multi::sessionactions', html: '<a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-busy-3F"><span class="method_name">#busy?</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
+ { method: 'busy?', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-busy-3F"><span class="method_name">#busy?</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'channels', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-channels"><span class="method_name">#channels</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'close', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-close"><span class="method_name">#close</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'close', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-close"><span class="method_name">#close</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'close', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-close"><span class="method_name">#close</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'close', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-close"><span class="method_name">#close</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'concat', module: 'net::ssh::multi::serverlist', html: '<a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-concat"><span class="method_name">#concat</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
+ { method: 'connect!', module: 'net::ssh::multi::sessionactions', html: '<a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-connect-21"><span class="method_name">#connect!</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
+ { method: 'delegate_to', module: 'net::ssh::multi::channelproxy', html: '<a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html#method-i-delegate_to"><span class="method_name">#delegate_to</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a>' },
+ { method: 'each', module: 'net::ssh::multi::serverlist', html: '<a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-each"><span class="method_name">#each</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
+ { method: 'each', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-each"><span class="method_name">#each</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'each', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-each"><span class="method_name">#each</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: 'eof!', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-eof-21"><span class="method_name">#eof!</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'evaluate!', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-evaluate-21"><span class="method_name">#evaluate!</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: 'exec', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-exec"><span class="method_name">#exec</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'exec', module: 'net::ssh::multi::sessionactions', html: '<a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-exec"><span class="method_name">#exec</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
+ { method: 'fail!', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-fail-21"><span class="method_name">#fail!</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'failed?', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-failed-3F"><span class="method_name">#failed?</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'first', module: 'net::ssh::multi::subsession', html: '<a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#method-i-first"><span class="method_name">#first</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a>' },
+ { method: 'flatten', module: 'net::ssh::multi::serverlist', html: '<a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-flatten"><span class="method_name">#flatten</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
+ { method: 'group', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-group"><span class="method_name">#group</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'hash', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-hash"><span class="method_name">#hash</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'inspect', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-inspect"><span class="method_name">#inspect</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'listeners', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-listeners"><span class="method_name">#listeners</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'loop', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-loop"><span class="method_name">#loop</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'loop_forever', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-loop_forever"><span class="method_name">#loop_forever</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'master', module: 'net::ssh::multi::sessionactions', html: '<a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-master"><span class="method_name">#master</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
+ { method: 'method_missing', module: 'net::ssh::multi::channelproxy', html: '<a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html#method-i-method_missing"><span class="method_name">#method_missing</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a>' },
+ { method: 'on', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-on"><span class="method_name">#on</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'on_close', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_close"><span class="method_name">#on_close</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'on_data', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_data"><span class="method_name">#on_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'on_eof', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_eof"><span class="method_name">#on_eof</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'on_extended_data', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_extended_data"><span class="method_name">#on_extended_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'on_open_failed', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_open_failed"><span class="method_name">#on_open_failed</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'on_process', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_process"><span class="method_name">#on_process</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'on_request', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_request"><span class="method_name">#on_request</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'open_channel', module: 'net::ssh::multi::sessionactions', html: '<a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-open_channel"><span class="method_name">#open_channel</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
+ { method: 'open_channel', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-open_channel"><span class="method_name">#open_channel</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'port', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-port"><span class="method_name">#port</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'postprocess', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-postprocess"><span class="method_name">#postprocess</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'preprocess', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-preprocess"><span class="method_name">#preprocess</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'process', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-process"><span class="method_name">#process</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'replace_with', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-replace_with"><span class="method_name">#replace_with</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'request_pty', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-request_pty"><span class="method_name">#request_pty</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'select', module: 'net::ssh::multi::serverlist', html: '<a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-select"><span class="method_name">#select</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
+ { method: 'send_data', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-send_data"><span class="method_name">#send_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'send_global_request', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-send_global_request"><span class="method_name">#send_global_request</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'send_global_request', module: 'net::ssh::multi::sessionactions', html: '<a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-send_global_request"><span class="method_name">#send_global_request</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
+ { method: 'servers', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-servers"><span class="method_name">#servers</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'servers_for', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-servers_for"><span class="method_name">#servers_for</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'session', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-session"><span class="method_name">#session</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'sessions', module: 'net::ssh::multi::sessionactions', html: '<a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-sessions"><span class="method_name">#sessions</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a>' },
+ { method: 'slice', module: 'net::ssh::multi::subsession', html: '<a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#method-i-slice"><span class="method_name">#slice</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a>' },
+ { method: 'to_ary', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-to_ary"><span class="method_name">#to_ary</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: 'to_ary', module: 'net::ssh::multi::serverlist', html: '<a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-to_ary"><span class="method_name">#to_ary</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a>' },
+ { method: 'to_s', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-to_s"><span class="method_name">#to_s</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'use', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-use"><span class="method_name">#use</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'via', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-via"><span class="method_name">#via</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'wait', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-wait"><span class="method_name">#wait</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'with', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-with"><span class="method_name">#with</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'callback', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#attribute-i-callback"><span class="method_name">#callback</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: 'channels', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#attribute-i-channels"><span class="method_name">#channels</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'concurrent_connections', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#attribute-i-concurrent_connections"><span class="method_name">#concurrent_connections</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'connection', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#attribute-i-connection"><span class="method_name">#connection</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'default_gateway', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#attribute-i-default_gateway"><span class="method_name">#default_gateway</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'default_user', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#attribute-i-default_user"><span class="method_name">#default_user</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'gateway', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#attribute-i-gateway"><span class="method_name">#gateway</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'groups', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#attribute-i-groups"><span class="method_name">#groups</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'host', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#attribute-i-host"><span class="method_name">#host</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'master', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#attribute-i-master"><span class="method_name">#master</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: 'master', module: 'net::ssh::multi::subsession', html: '<a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#attribute-i-master"><span class="method_name">#master</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a>' },
+ { method: 'master', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#attribute-i-master"><span class="method_name">#master</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'on_confirm', module: 'net::ssh::multi::channelproxy', html: '<a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html#attribute-i-on_confirm"><span class="method_name">#on_confirm</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a>' },
+ { method: 'on_error', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#attribute-i-on_error"><span class="method_name">#on_error</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'options', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#attribute-i-options"><span class="method_name">#options</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
+ { method: 'options', module: 'net::ssh::multi::dynamicserver', html: '<a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#attribute-i-options"><span class="method_name">#options</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a>' },
+ { method: 'properties', module: 'net::ssh::multi::channel', html: '<a target="docwin" href="classes/Net/SSH/Multi/Channel.html#attribute-i-properties"><span class="method_name">#properties</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a>' },
+ { method: 'server', module: 'net::ssh::multi::pendingconnection', html: '<a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#attribute-i-server"><span class="method_name">#server</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a>' },
+ { method: 'server_list', module: 'net::ssh::multi::session', html: '<a target="docwin" href="classes/Net/SSH/Multi/Session.html#attribute-i-server_list"><span class="method_name">#server_list</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a>' },
+ { method: 'servers', module: 'net::ssh::multi::subsession', html: '<a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#attribute-i-servers"><span class="method_name">#servers</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a>' },
+ { method: 'user', module: 'net::ssh::multi::server', html: '<a target="docwin" href="classes/Net/SSH/Multi/Server.html#attribute-i-user"><span class="method_name">#user</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a>' },
]
$(document).observe('dom:loaded', function() {
// Setup search-during-typing.
@@ -4481,86 +4502,107 @@
</form>
<ol class='methods' id='search-results' style='display: none'></ol>
<ol class='methods' id='index-entries'>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000050"><span class="method_name">&lt;=&gt;</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000011"><span class="method_name">[]</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/DynamicServer.html#M000031"><span class="method_name">[]</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000047"><span class="method_name">[]</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000048"><span class="method_name">[]=</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000012"><span class="method_name">[]=</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/DynamicServer.html#M000032"><span class="method_name">[]=</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000016"><span class="method_name">active?</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ServerList.html#M000060"><span class="method_name">add</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000057"><span class="method_name">busy?</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000040"><span class="method_name">busy?</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/SessionActions.html#M000004"><span class="method_name">busy?</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000042"><span class="method_name">channels</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000074"><span class="method_name">close</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000018"><span class="method_name">close</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000041"><span class="method_name">close</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000058"><span class="method_name">close</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ServerList.html#M000061"><span class="method_name">concat</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/SessionActions.html#M000003"><span class="method_name">connect!</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ChannelProxy.html#M000028"><span class="method_name">delegate_to</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/DynamicServer.html#M000033"><span class="method_name">each</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000010"><span class="method_name">each</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ServerList.html#M000062"><span class="method_name">each</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000019"><span class="method_name">eof!</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/DynamicServer.html#M000034"><span class="method_name">evaluate!</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/SessionActions.html#M000008"><span class="method_name">exec</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000013"><span class="method_name">exec</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000055"><span class="method_name">fail!</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000054"><span class="method_name">failed?</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Subsession.html#M000080"><span class="method_name">first</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ServerList.html#M000064"><span class="method_name">flatten</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000067"><span class="method_name">group</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000051"><span class="method_name">hash</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000053"><span class="method_name">inspect</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000045"><span class="method_name">listeners</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000075"><span class="method_name">loop</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000076"><span class="method_name">loop_forever</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/SessionActions.html#M000002"><span class="method_name">master</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ChannelProxy.html#M000029"><span class="method_name">method_missing</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ServerList.html#M000059"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ChannelProxy.html#M000027"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000036"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000066"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000009"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Subsession.html#M000078"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000046"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/DynamicServer.html#M000030"><span class="method_name">new</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000073"><span class="method_name">on</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000023"><span class="method_name">on_close</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000020"><span class="method_name">on_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000024"><span class="method_name">on_eof</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000021"><span class="method_name">on_extended_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000025"><span class="method_name">on_open_failed</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000022"><span class="method_name">on_process</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000026"><span class="method_name">on_request</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000038"><span class="method_name">open_channel</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/SessionActions.html#M000007"><span class="method_name">open_channel</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000049"><span class="method_name">port</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000044"><span class="method_name">postprocess</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000043"><span class="method_name">preprocess</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000077"><span class="method_name">process</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000037"><span class="method_name">replace_with</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000014"><span class="method_name">request_pty</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ServerList.html#M000063"><span class="method_name">select</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000015"><span class="method_name">send_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/SessionActions.html#M000006"><span class="method_name">send_global_request</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/PendingConnection.html#M000039"><span class="method_name">send_global_request</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000070"><span class="method_name">servers</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000071"><span class="method_name">servers_for</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000056"><span class="method_name">session</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/SessionActions.html#M000005"><span class="method_name">sessions</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Subsession.html#M000079"><span class="method_name">slice</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a></li>
- <li><a href="classes/Net/SSH/Multi.html#M000001"><span class="method_name">start</span> <span class="module_name">(Net::SSH::Multi)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/DynamicServer.html#M000035"><span class="method_name">to_ary</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/ServerList.html#M000065"><span class="method_name">to_ary</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Server.html#M000052"><span class="method_name">to_s</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000069"><span class="method_name">use</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000068"><span class="method_name">via</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Channel.html#M000017"><span class="method_name">wait</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
- <li><a href="classes/Net/SSH/Multi/Session.html#M000072"><span class="method_name">with</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-callback"><span class="method_name">#callback</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-channels"><span class="method_name">#channels</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-concurrent_connections"><span class="method_name">#concurrent_connections</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-connection"><span class="method_name">#connection</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-default_gateway"><span class="method_name">#default_gateway</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-default_user"><span class="method_name">#default_user</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-gateway"><span class="method_name">#gateway</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-groups"><span class="method_name">#groups</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-host"><span class="method_name">#host</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-master"><span class="method_name">#master</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#method-master"><span class="method_name">#master</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-master"><span class="method_name">#master</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html#method-on_confirm"><span class="method_name">#on_confirm</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-on_error"><span class="method_name">#on_error</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-options"><span class="method_name">#options</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-options"><span class="method_name">#options</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-properties"><span class="method_name">#properties</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-server"><span class="method_name">#server</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-server_list"><span class="method_name">#server_list</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#method-servers"><span class="method_name">#servers</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-user"><span class="method_name">#user</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-c-new"><span class="method_name">::new</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi.html#method-c-start"><span class="method_name">::start</span> <span class="module_name">(Net::SSH::Multi)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-3C-3D-3E"><span class="method_name">#&lt;=&gt;</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-5B-5D"><span class="method_name">#[]</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-5B-5D"><span class="method_name">#[]</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-5B-5D"><span class="method_name">#[]</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-5B-5D-3D"><span class="method_name">#[]=</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-5B-5D-3D"><span class="method_name">#[]=</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-5B-5D-3D"><span class="method_name">#[]=</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-active-3F"><span class="method_name">#active?</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-add"><span class="method_name">#add</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-busy-3F"><span class="method_name">#busy?</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-busy-3F"><span class="method_name">#busy?</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-busy-3F"><span class="method_name">#busy?</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-channels"><span class="method_name">#channels</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-close"><span class="method_name">#close</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-close"><span class="method_name">#close</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-close"><span class="method_name">#close</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-close"><span class="method_name">#close</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-concat"><span class="method_name">#concat</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-connect-21"><span class="method_name">#connect!</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html#method-i-delegate_to"><span class="method_name">#delegate_to</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-each"><span class="method_name">#each</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-each"><span class="method_name">#each</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-each"><span class="method_name">#each</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-eof-21"><span class="method_name">#eof!</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-evaluate-21"><span class="method_name">#evaluate!</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-exec"><span class="method_name">#exec</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-exec"><span class="method_name">#exec</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-fail-21"><span class="method_name">#fail!</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-failed-3F"><span class="method_name">#failed?</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#method-i-first"><span class="method_name">#first</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-flatten"><span class="method_name">#flatten</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-group"><span class="method_name">#group</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-hash"><span class="method_name">#hash</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-inspect"><span class="method_name">#inspect</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-listeners"><span class="method_name">#listeners</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-loop"><span class="method_name">#loop</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-loop_forever"><span class="method_name">#loop_forever</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-master"><span class="method_name">#master</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ChannelProxy.html#method-i-method_missing"><span class="method_name">#method_missing</span> <span class="module_name">(Net::SSH::Multi::ChannelProxy)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-on"><span class="method_name">#on</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_close"><span class="method_name">#on_close</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_data"><span class="method_name">#on_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_eof"><span class="method_name">#on_eof</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_extended_data"><span class="method_name">#on_extended_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_open_failed"><span class="method_name">#on_open_failed</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_process"><span class="method_name">#on_process</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-on_request"><span class="method_name">#on_request</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-open_channel"><span class="method_name">#open_channel</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-open_channel"><span class="method_name">#open_channel</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-port"><span class="method_name">#port</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-postprocess"><span class="method_name">#postprocess</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-preprocess"><span class="method_name">#preprocess</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-process"><span class="method_name">#process</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-replace_with"><span class="method_name">#replace_with</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-request_pty"><span class="method_name">#request_pty</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-select"><span class="method_name">#select</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-send_data"><span class="method_name">#send_data</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/PendingConnection.html#method-i-send_global_request"><span class="method_name">#send_global_request</span> <span class="module_name">(Net::SSH::Multi::PendingConnection)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-send_global_request"><span class="method_name">#send_global_request</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-servers"><span class="method_name">#servers</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-servers_for"><span class="method_name">#servers_for</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-session"><span class="method_name">#session</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/SessionActions.html#method-i-sessions"><span class="method_name">#sessions</span> <span class="module_name">(Net::SSH::Multi::SessionActions)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Subsession.html#method-i-slice"><span class="method_name">#slice</span> <span class="module_name">(Net::SSH::Multi::Subsession)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/DynamicServer.html#method-i-to_ary"><span class="method_name">#to_ary</span> <span class="module_name">(Net::SSH::Multi::DynamicServer)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/ServerList.html#method-i-to_ary"><span class="method_name">#to_ary</span> <span class="module_name">(Net::SSH::Multi::ServerList)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Server.html#method-i-to_s"><span class="method_name">#to_s</span> <span class="module_name">(Net::SSH::Multi::Server)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-use"><span class="method_name">#use</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-via"><span class="method_name">#via</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Channel.html#method-i-wait"><span class="method_name">#wait</span> <span class="module_name">(Net::SSH::Multi::Channel)</span></a></li>
+ <li><a target="docwin" href="classes/Net/SSH/Multi/Session.html#method-i-with"><span class="method_name">#with</span> <span class="module_name">(Net::SSH::Multi::Session)</span></a></li>
</ol>
</div>
</body>
diff --git a/index.html b/index.html
index bc56304..558dc21 100644
--- a/index.html
+++ b/index.html
@@ -1,8 +1,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
- <title>Control multiple Net::SSH connections via a single interface.</title>
- <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
+ <title>net-ssh-multi 1.1.0</title>
+ <meta content='text/html; charset=US-ASCII' http-equiv='Content-Type'>
</head>
<frameset border='1' bordercolor='gray' cols='20%, *' frameborder='1'>
<frameset rows='15%, 35%, 50%'>
diff --git a/pkg/net-ssh-multi-1.1.0.gem b/pkg/net-ssh-multi-1.1.0.gem
new file mode 100644
index 0000000..bf5045d
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1.0.gem
Binary files differ
diff --git a/pkg/net-ssh-multi-1.1.gem b/pkg/net-ssh-multi-1.1.gem
new file mode 100644
index 0000000..1ef91c5
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1.gem
Binary files differ
diff --git a/pkg/net-ssh-multi-1.1.tgz b/pkg/net-ssh-multi-1.1.tgz
new file mode 100644
index 0000000..89f22b8
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1.tgz
Binary files differ
diff --git a/pkg/net-ssh-multi-1.1/CHANGELOG.rdoc b/pkg/net-ssh-multi-1.1/CHANGELOG.rdoc
new file mode 100644
index 0000000..3e3224a
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/CHANGELOG.rdoc
@@ -0,0 +1,25 @@
+=== 1.1 / 3 Apr 2011
+
+* Rescue Timeout::Error so :on_error works as expected when server is unavailable. [Joel Watson]
+
+
+=== 1.0.1 / 1 Feb 2009
+
+* Remove redundant call to block_given? in Session#group [paddor]
+
+* Add Channel#on_open_failed callback hook [Jamis Buck]
+
+
+=== 1.0.0 / 1 May 2008
+
+* (no changes since the last preview release)
+
+
+=== 1.0 Preview Release 2 (0.99.1) / 19 Apr 2008
+
+* Don't try to select on closed IO streams [Jamis Buck]
+
+
+=== 1.0 Preview Release 1 (0.99.0) / 10 Apr 2008
+
+* First release of Net::SSH::Multi
diff --git a/pkg/net-ssh-multi-1.1/README.rdoc b/pkg/net-ssh-multi-1.1/README.rdoc
new file mode 100644
index 0000000..73ca258
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/README.rdoc
@@ -0,0 +1,87 @@
+= Net::SSH::Multi
+
+* http://net-ssh.rubyforge.org/multi
+
+== DESCRIPTION:
+
+Net::SSH::Multi is a library for controlling multiple Net::SSH connections via a single interface. It exposes an API similar to that of Net::SSH::Connection::Session and Net::SSH::Connection::Channel, making it simpler to adapt programs designed for single connections to be used with multiple connections.
+
+This library is particularly useful for automating repetitive tasks that must be performed on multiple machines. It executes the commands in parallel, and allows commands to be executed on subsets of servers (defined by groups).
+
+== FEATURES:
+
+* Easily manage multiple connections
+* Open channels, spawn processes, etc. on multiple connections in parallel
+* Transparently limit concurrent connections when dealing with large numbers of servers (Net::SSH::Multi::Session#concurrent_connections)
+* Specify a default gateway machine through which connections should be tunneled, or even specify a different gateway machine for each server
+
+== SYNOPSIS:
+
+In a nutshell:
+
+ require 'net/ssh/multi'
+
+ Net::SSH::Multi.start do |session|
+ # access servers via a gateway
+ session.via 'gateway', 'gateway-user'
+
+ # define the servers we want to use
+ session.use 'user1@host1'
+ session.use 'user2@host2'
+
+ # define servers in groups for more granular access
+ session.group :app do
+ session.use 'user@app1'
+ session.use 'user@app2'
+ end
+
+ # execute commands on all servers
+ session.exec "uptime"
+
+ # execute commands on a subset of servers
+ session.with(:app).exec "hostname"
+
+ # run the aggregated event loop
+ session.loop
+ end
+
+See Net::SSH::Multi::Session for more documentation.
+
+== REQUIREMENTS:
+
+* net-ssh (version 2)
+* net-ssh-gateway
+
+If you want to run the tests or use any of the Rake tasks, you'll need:
+
+* Echoe (for the Rakefile)
+* Mocha (for the tests)
+
+== INSTALL:
+
+* gem install net-ssh-multi (might need sudo privileges)
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2008 Jamis Buck <jamis@37signals.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/pkg/net-ssh-multi-1.1/Rakefile b/pkg/net-ssh-multi-1.1/Rakefile
new file mode 100644
index 0000000..d959b21
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/Rakefile
@@ -0,0 +1,85 @@
+
+require 'rubygems'
+require 'rake/clean'
+require 'rake/gempackagetask'
+require 'fileutils'
+include FileUtils
+
+begin
+ require 'hanna/rdoctask'
+rescue LoadError
+ require 'rake/rdoctask'
+end
+
+
+task :default => :package
+
+# CONFIG =============================================================
+
+# Change the following according to your needs
+README = "README.rdoc"
+CHANGES = "CHANGELOG.rdoc"
+THANKS = ''
+
+# Files and directories to be deleted when you run "rake clean"
+CLEAN.include [ 'pkg', '*.gem', '.config', 'doc']
+
+# Virginia assumes your project and gemspec have the same name
+name = 'net-ssh-multi'
+load "#{name}.gemspec"
+version = @spec.version
+
+# That's it! The following defaults should allow you to get started
+# on other things.
+
+
+# TESTS/SPECS =========================================================
+
+
+
+# INSTALL =============================================================
+
+Rake::GemPackageTask.new(@spec) do |p|
+ p.need_tar = true if RUBY_PLATFORM !~ /mswin/
+end
+
+task :build => [ :package ]
+task :release => [ :rdoc, :package ]
+task :install => [ :rdoc, :package ] do
+ sh %{sudo gem install pkg/#{name}-#{version}.gem}
+end
+task :uninstall => [ :clean ] do
+ sh %{sudo gem uninstall #{name}}
+end
+
+
+# RUBYFORGE RELEASE / PUBLISH TASKS ==================================
+
+if @spec.rubyforge_project
+ desc 'Publish website to rubyforge'
+ task 'publish:rdoc' => 'doc/index.html' do
+ sh "scp -r doc/* rubyforge.org:/var/www/gforge-projects/#{name}/ssh/v2/api/"
+ end
+
+ desc 'Public release to rubyforge'
+ task 'publish:gem' => [:package] do |t|
+ sh <<-end
+ rubyforge add_release -o Any -a #{CHANGES} -f -n #{README} #{name} #{name} #{@spec.version} pkg/#{name}-#{@spec.version}.gem &&
+ rubyforge add_file -o Any -a #{CHANGES} -f -n #{README} #{name} #{name} #{@spec.version} pkg/#{name}-#{@spec.version}.tgz
+ end
+ end
+end
+
+
+
+# RUBY DOCS TASK ==================================
+
+Rake::RDocTask.new do |t|
+ t.rdoc_dir = 'doc'
+ t.title = @spec.summary
+ t.options << '--line-numbers' << '-A cattr_accessor=object'
+ t.options << '--charset' << 'utf-8'
+ t.rdoc_files.include(README)
+ t.rdoc_files.include(CHANGES)
+ t.rdoc_files.include('lib/**/*.rb')
+end
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi.rb
new file mode 100644
index 0000000..1664d0e
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi.rb
@@ -0,0 +1,71 @@
+require 'net/ssh/multi/session'
+
+module Net; module SSH
+ # Net::SSH::Multi is a library for controlling multiple Net::SSH
+ # connections via a single interface. It exposes an API similar to that of
+ # Net::SSH::Connection::Session and Net::SSH::Connection::Channel, making it
+ # simpler to adapt programs designed for single connections to be used with
+ # multiple connections.
+ #
+ # This library is particularly useful for automating repetitive tasks that
+ # must be performed on multiple machines. It executes the commands in
+ # parallel, and allows commands to be executed on subsets of servers
+ # (defined by groups).
+ #
+ # require 'net/ssh/multi'
+ #
+ # Net::SSH::Multi.start do |session|
+ # # access servers via a gateway
+ # session.via 'gateway', 'gateway-user'
+ #
+ # # define the servers we want to use
+ # session.use 'user1@host1'
+ # session.use 'user2@host2'
+ #
+ # # define servers in groups for more granular access
+ # session.group :app do
+ # session.use 'user@app1'
+ # session.use 'user@app2'
+ # end
+ #
+ # # execute commands on all servers
+ # session.exec "uptime"
+ #
+ # # execute commands on a subset of servers
+ # session.with(:app).exec "hostname"
+ #
+ # # run the aggregated event loop
+ # session.loop
+ # end
+ #
+ # See Net::SSH::Multi::Session for more documentation.
+ module Multi
+ # This is a convenience method for instantiating a new
+ # Net::SSH::Multi::Session. If a block is given, the session will be
+ # yielded to the block automatically closed (see Net::SSH::Multi::Session#close)
+ # when the block finishes. Otherwise, the new session will be returned.
+ #
+ # Net::SSH::Multi.start do |session|
+ # # ...
+ # end
+ #
+ # session = Net::SSH::Multi.start
+ # # ...
+ # session.close
+ #
+ # Any options are passed directly to Net::SSH::Multi::Session.new (q.v.).
+ def self.start(options={})
+ session = Session.new(options)
+
+ if block_given?
+ begin
+ yield session
+ session.loop
+ session.close
+ end
+ else
+ return session
+ end
+ end
+ end
+end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/channel.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/channel.rb
new file mode 100644
index 0000000..34bd117
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/channel.rb
@@ -0,0 +1,230 @@
+module Net; module SSH; module Multi
+ # Net::SSH::Multi::Channel encapsulates a collection of Net::SSH::Connection::Channel
+ # instances from multiple different connections. It allows for operations to
+ # be performed on all contained channels, simultaneously, using an interface
+ # mostly identical to Net::SSH::Connection::Channel itself.
+ #
+ # You typically obtain a Net::SSH::Multi::Channel instance via
+ # Net::SSH::Multi::Session#open_channel or Net::SSH::Multi::Session#exec,
+ # though there is nothing stopping you from instantiating one yourself with
+ # a handful of Net::SSH::Connection::Channel objects (though they should be
+ # associated with connections managed by a Net::SSH::Multi::Session object
+ # for consistent behavior).
+ #
+ # channel = session.open_channel do |ch|
+ # # ...
+ # end
+ #
+ # channel.wait
+ class Channel
+ include Enumerable
+
+ # The Net::SSH::Multi::Session instance that controls this channel collection.
+ attr_reader :connection
+
+ # The collection of Net::SSH::Connection::Channel instances that this multi-channel aggregates.
+ attr_reader :channels
+
+ # A Hash of custom properties that may be set and queried on this object.
+ attr_reader :properties
+
+ # Instantiate a new Net::SSH::Multi::Channel instance, controlled by the
+ # given +connection+ (a Net::SSH::Multi::Session object) and wrapping the
+ # given +channels+ (Net::SSH::Connection::Channel instances).
+ #
+ # You will typically never call this directly; rather, you'll get your
+ # multi-channel references via Net::SSH::Multi::Session#open_channel and
+ # friends.
+ def initialize(connection, channels)
+ @connection = connection
+ @channels = channels
+ @properties = {}
+ end
+
+ # Iterate over each component channel object, yielding each in order to the
+ # associated block.
+ def each
+ @channels.each { |channel| yield channel }
+ end
+
+ # Retrieve the property (see #properties) with the given +key+.
+ #
+ # host = channel[:host]
+ def [](key)
+ @properties[key]
+ end
+
+ # Set the property (see #properties) with the given +key+ to the given
+ # +value+.
+ #
+ # channel[:visited] = true
+ def []=(key, value)
+ @properties[key] = value
+ end
+
+ # Perform an +exec+ command on all component channels. The block, if given,
+ # is passed to each component channel, so it will (potentially) be invoked
+ # once for every channel in the collection. The block will receive two
+ # parameters: the specific channel object being operated on, and a boolean
+ # indicating whether the exec succeeded or not.
+ #
+ # channel.exec "ls -l" do |ch, success|
+ # # ...
+ # end
+ #
+ # See the documentation in Net::SSH for Net::SSH::Connection::Channel#exec
+ # for more information on how to work with the callback.
+ def exec(command, &block)
+ channels.each { |channel| channel.exec(command, &block) }
+ self
+ end
+
+ # Perform a +request_pty+ command on all component channels. The block, if
+ # given, is passed to each component channel, so it will (potentially) be
+ # invoked once for every channel in the collection. The block will
+ # receive two parameters: the specific channel object being operated on,
+ # and a boolean indicating whether the pty request succeeded or not.
+ #
+ # channel.request_pty do |ch, success|
+ # # ...
+ # end
+ #
+ # See the documentation in Net::SSH for
+ # Net::SSH::Connection::Channel#request_pty for more information on how to
+ # work with the callback.
+ def request_pty(opts={}, &block)
+ channels.each { |channel| channel.request_pty(opts, &block) }
+ self
+ end
+
+ # Send the given +data+ to each component channel. It will be sent to the
+ # remote process, typically being received on the process' +stdin+ stream.
+ #
+ # channel.send_data "password\n"
+ def send_data(data)
+ channels.each { |channel| channel.send_data(data) }
+ self
+ end
+
+ # Returns true as long as any of the component channels are active.
+ #
+ # connection.loop { channel.active? }
+ def active?
+ channels.any? { |channel| channel.active? }
+ end
+
+ # Runs the connection's event loop until the channel is no longer active
+ # (see #active?).
+ #
+ # channel.exec "something"
+ # channel.wait
+ def wait
+ connection.loop { active? }
+ self
+ end
+
+ # Closes all component channels.
+ def close
+ channels.each { |channel| channel.close }
+ self
+ end
+
+ # Tells the remote process for each component channel not to expect any
+ # further data from this end of the channel.
+ def eof!
+ channels.each { |channel| channel.eof! }
+ self
+ end
+
+ # Registers a callback on all component channels, to be invoked when the
+ # remote process emits data (usually on its +stdout+ stream). The block
+ # will be invoked with two arguments: the specific channel object, and the
+ # data that was received.
+ #
+ # channel.on_data do |ch, data|
+ # puts "got data: #{data}"
+ # end
+ def on_data(&block)
+ channels.each { |channel| channel.on_data(&block) }
+ self
+ end
+
+ # Registers a callback on all component channels, to be invoked when the
+ # remote process emits "extended" data (typically on its +stderr+ stream).
+ # The block will be invoked with three arguments: the specific channel
+ # object, an integer describing the data type (usually a 1 for +stderr+)
+ # and the data that was received.
+ #
+ # channel.on_extended_data do |ch, type, data|
+ # puts "got extended data: #{data}"
+ # end
+ def on_extended_data(&block)
+ channels.each { |channel| channel.on_extended_data(&block) }
+ self
+ end
+
+ # Registers a callback on all component channels, to be invoked during the
+ # idle portion of the connection event loop. The callback will be invoked
+ # with one argument: the specific channel object being processed.
+ #
+ # channel.on_process do |ch|
+ # # ...
+ # end
+ def on_process(&block)
+ channels.each { |channel| channel.on_process(&block) }
+ self
+ end
+
+ # Registers a callback on all component channels, to be invoked when the
+ # remote server terminates the channel. The callback will be invoked
+ # with one argument: the specific channel object being closed.
+ #
+ # channel.on_close do |ch|
+ # # ...
+ # end
+ def on_close(&block)
+ channels.each { |channel| channel.on_close(&block) }
+ self
+ end
+
+ # Registers a callback on all component channels, to be invoked when the
+ # remote server has no further data to send. The callback will be invoked
+ # with one argument: the specific channel object being marked EOF.
+ #
+ # channel.on_eof do |ch|
+ # # ...
+ # end
+ def on_eof(&block)
+ channels.each { |channel| channel.on_eof(&block) }
+ self
+ end
+
+ # Registers a callback on all component channels, to be invoked when the
+ # remote server is unable to open the channel. The callback will be
+ # invoked with three arguments: the channel object that couldn't be
+ # opened, a description of the error (as a string), and an integer code
+ # representing the error.
+ #
+ # channel.on_open_failed do |ch, description, code|
+ # # ...
+ # end
+ def on_open_failed(&block)
+ channels.each { |channel| channel.on_open_failed(&block) }
+ self
+ end
+
+ # Registers a callback on all component channels, to be invoked when the
+ # remote server sends a channel request of the given +type+. The callback
+ # will be invoked with two arguments: the specific channel object receiving
+ # the request, and a Net::SSH::Buffer instance containing the request-specific
+ # data.
+ #
+ # channel.on_request("exit-status") do |ch, data|
+ # puts "exited with #{data.read_long}"
+ # end
+ def on_request(type, &block)
+ channels.each { |channel| channel.on_request(type, &block) }
+ self
+ end
+ end
+end; end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/channel_proxy.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/channel_proxy.rb
new file mode 100644
index 0000000..df5c04c
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/channel_proxy.rb
@@ -0,0 +1,50 @@
+module Net; module SSH; module Multi
+
+ # The ChannelProxy is a delegate class that represents a channel that has
+ # not yet been opened. It is only used when Net::SSH::Multi is running with
+ # with a concurrent connections limit (see Net::SSH::Multi::Session#concurrent_connections).
+ #
+ # You'll never need to instantiate one of these directly, and will probably
+ # (if all goes well!) never even notice when one of these is in use. Essentially,
+ # it is spawned by a Net::SSH::Multi::PendingConnection when the pending
+ # connection is asked to open a channel. Any actions performed on the
+ # channel proxy will then be recorded, until a real channel is set as the
+ # delegate (see #delegate_to). At that point, all recorded actions will be
+ # replayed on the channel, and any subsequent actions will be immediately
+ # delegated to the channel.
+ class ChannelProxy
+ # This is the "on confirm" callback that gets called when the real channel
+ # is opened.
+ attr_reader :on_confirm
+
+ # Instantiates a new channel proxy with the given +on_confirm+ callback.
+ def initialize(&on_confirm)
+ @on_confirm = on_confirm
+ @recordings = []
+ @channel = nil
+ end
+
+ # Instructs the proxy to delegate all further actions to the given +channel+
+ # (which must be an instance of Net::SSH::Connection::Channel). All recorded
+ # actions are immediately replayed, in order, against the delegate channel.
+ def delegate_to(channel)
+ @channel = channel
+ @recordings.each do |sym, args, block|
+ @channel.__send__(sym, *args, &block)
+ end
+ end
+
+ # If a channel delegate has been specified (see #delegate_to), the method
+ # will be immediately sent to the delegate. Otherwise, the call is added
+ # to the list of recorded method calls, to be played back when a delegate
+ # is specified.
+ def method_missing(sym, *args, &block)
+ if @channel
+ @channel.__send__(sym, *args, &block)
+ else
+ @recordings << [sym, args, block]
+ end
+ end
+ end
+
+end; end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/dynamic_server.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/dynamic_server.rb
new file mode 100644
index 0000000..cbdde2b
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/dynamic_server.rb
@@ -0,0 +1,71 @@
+require 'net/ssh/multi/server'
+
+module Net; module SSH; module Multi
+
+ # Represents a lazily evaluated collection of servers. This will usually be
+ # created via Net::SSH::Multi::Session#use(&block), and is useful for creating
+ # server definitions where the name or address of the servers are not known
+ # until run-time.
+ #
+ # session.use { lookup_ip_address_of_server }
+ #
+ # This prevents +lookup_ip_address_of_server+ from being invoked unless the
+ # server is actually needed, at which point it is invoked and the result
+ # cached.
+ #
+ # The callback should return either +nil+ (in which case no new servers are
+ # instantiated), a String (representing a connection specification), an
+ # array of Strings, or an array of Net::SSH::Multi::Server instances.
+ class DynamicServer
+ # The Net::SSH::Multi::Session instance that owns this dynamic server record.
+ attr_reader :master
+
+ # The Proc object to call to evaluate the server(s)
+ attr_reader :callback
+
+ # The hash of options that will be used to initialize the server records.
+ attr_reader :options
+
+ # Create a new DynamicServer record, owned by the given Net::SSH::Multi::Session
+ # +master+, with the given hash of +options+, and using the given Proc +callback+
+ # to lazily evaluate the actual server instances.
+ def initialize(master, options, callback)
+ @master, @options, @callback = master, options, callback
+ @servers = nil
+ end
+
+ # Returns the value for the given +key+ in the :properties hash of the
+ # +options+. If no :properties hash exists in +options+, this returns +nil+.
+ def [](key)
+ (options[:properties] ||= {})[key]
+ end
+
+ # Sets the given key/value pair in the +:properties+ key in the options
+ # hash. If the options hash has no :properties key, it will be created.
+ def []=(key, value)
+ (options[:properties] ||= {})[key] = value
+ end
+
+ # Iterates over every instantiated server record in this dynamic server.
+ # If the servers have not yet been instantiated, this does nothing (e.g.,
+ # it does _not_ automatically invoke #evaluate!).
+ def each
+ (@servers || []).each { |server| yield server }
+ end
+
+ # Evaluates the callback and instantiates the servers, memoizing the result.
+ # Subsequent calls to #evaluate! will simply return the cached list of
+ # servers.
+ def evaluate!
+ @servers ||= Array(callback[options]).map do |server|
+ case server
+ when String then Net::SSH::Multi::Server.new(master, server, options)
+ else server
+ end
+ end
+ end
+
+ alias to_ary evaluate!
+ end
+
+end; end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/pending_connection.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/pending_connection.rb
new file mode 100644
index 0000000..6af0fac
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/pending_connection.rb
@@ -0,0 +1,112 @@
+require 'net/ssh/multi/channel_proxy'
+
+module Net; module SSH; module Multi
+
+ # A PendingConnection instance mimics a Net::SSH::Connection::Session instance,
+ # without actually being an open connection to a server. It is used by
+ # Net::SSH::Multi::Session when a concurrent connection limit is in effect,
+ # so that a server can hang on to a "connection" that isn't really a connection.
+ #
+ # Any requests against this connection (like #open_channel or #send_global_request)
+ # are not actually sent, but are added to a list of recordings. When the real
+ # session is opened and replaces this pending connection, all recorded actions
+ # will be replayed against that session.
+ #
+ # You'll never need to initialize one of these directly, and (if all goes well!)
+ # should never even notice that one of these is in use. Net::SSH::Multi::Session
+ # will instantiate these as needed, and only when there is a concurrent
+ # connection limit.
+ class PendingConnection
+ # Represents a #open_channel action.
+ class ChannelOpenRecording #:nodoc:
+ attr_reader :type, :extras, :channel
+
+ def initialize(type, extras, channel)
+ @type, @extras, @channel = type, extras, channel
+ end
+
+ def replay_on(session)
+ real_channel = session.open_channel(type, *extras, &channel.on_confirm)
+ channel.delegate_to(real_channel)
+ end
+ end
+
+ # Represents a #send_global_request action.
+ class SendGlobalRequestRecording #:nodoc:
+ attr_reader :type, :extra, :callback
+
+ def initialize(type, extra, callback)
+ @type, @extra, @callback = type, extra, callback
+ end
+
+ def replay_on(session)
+ session.send_global_request(type, *extra, &callback)
+ end
+ end
+
+ # The Net::SSH::Multi::Server object that "owns" this pending connection.
+ attr_reader :server
+
+ # Instantiates a new pending connection for the given Net::SSH::Multi::Server
+ # object.
+ def initialize(server)
+ @server = server
+ @recordings = []
+ end
+
+ # Instructs the pending session to replay all of its recordings against the
+ # given +session+, and to then replace itself with the given session.
+ def replace_with(session)
+ @recordings.each { |recording| recording.replay_on(session) }
+ @server.replace_session(session)
+ end
+
+ # Records that a channel open request has been made, and returns a new
+ # Net::SSH::Multi::ChannelProxy object to represent the (as yet unopened)
+ # channel.
+ def open_channel(type="session", *extras, &on_confirm)
+ channel = ChannelProxy.new(&on_confirm)
+ @recordings << ChannelOpenRecording.new(type, extras, channel)
+ return channel
+ end
+
+ # Records that a global request has been made. The request is not actually
+ # sent, and won't be until #replace_with is called.
+ def send_global_request(type, *extra, &callback)
+ @recordings << SendGlobalRequestRecording.new(type, extra, callback)
+ self
+ end
+
+ # Always returns +true+, so that the pending connection looks active until
+ # it can be truly opened and replaced with a real connection.
+ def busy?(include_invisible=false)
+ true
+ end
+
+ # Does nothing, except to make a pending connection quack like a real connection.
+ def close
+ self
+ end
+
+ # Returns an empty array, since a pending connection cannot have any real channels.
+ def channels
+ []
+ end
+
+ # Returns +true+, and does nothing else.
+ def preprocess
+ true
+ end
+
+ # Returns +true+, and does nothing else.
+ def postprocess(readers, writers)
+ true
+ end
+
+ # Returns an empty hash, since a pending connection has no real listeners.
+ def listeners
+ {}
+ end
+ end
+
+end; end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/server.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/server.rb
new file mode 100644
index 0000000..bce228f
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/server.rb
@@ -0,0 +1,231 @@
+require 'net/ssh'
+
+module Net; module SSH; module Multi
+ # Encapsulates the connection information for a single remote server, as well
+ # as the Net::SSH session corresponding to that information. You'll rarely
+ # need to instantiate one of these directly: instead, you should use
+ # Net::SSH::Multi::Session#use.
+ class Server
+ include Comparable
+
+ # The Net::SSH::Multi::Session instance that manages this server instance.
+ attr_reader :master
+
+ # The host name (or IP address) of the server to connect to.
+ attr_reader :host
+
+ # The user name to use when logging into the server.
+ attr_reader :user
+
+ # The Hash of additional options to pass to Net::SSH when connecting
+ # (including things like :password, and so forth).
+ attr_reader :options
+
+ # The Net::SSH::Gateway instance to use to establish the connection. Will
+ # be +nil+ if the connection should be established without a gateway.
+ attr_reader :gateway
+
+ # Creates a new Server instance with the given connection information. The
+ # +master+ argument must be a reference to the Net::SSH::Multi::Session
+ # instance that will manage this server reference. The +options+ hash must
+ # conform to the options described for Net::SSH::start, with two additions:
+ #
+ # * :via => a Net::SSH::Gateway instance to use when establishing a
+ # connection to this server.
+ # * :user => the name of the user to use when logging into this server.
+ #
+ # The +host+ argument may include the username and port number, in which
+ # case those values take precedence over similar values given in the +options+:
+ #
+ # server = Net::SSH::Multi::Server.new(session, 'user@host:1234')
+ # puts server.user #-> user
+ # puts server.port #-> 1234
+ def initialize(master, host, options={})
+ @master = master
+ @options = options.dup
+
+ @user, @host, port = host.match(/^(?:([^;,:=]+)@|)(.*?)(?::(\d+)|)$/)[1,3]
+
+ user_opt, port_opt = @options.delete(:user), @options.delete(:port)
+
+ @user = @user || user_opt || master.default_user
+ port ||= port_opt
+
+ @options[:port] = port.to_i if port
+
+ @gateway = @options.delete(:via)
+ @failed = false
+ end
+
+ # Returns the value of the server property with the given +key+. Server
+ # properties are described via the +:properties+ key in the options hash
+ # when defining the Server.
+ def [](key)
+ (options[:properties] || {})[key]
+ end
+
+ # Sets the given key/value pair in the +:properties+ key in the options
+ # hash. If the options hash has no :properties key, it will be created.
+ def []=(key, value)
+ (options[:properties] ||= {})[key] = value
+ end
+
+ # Returns the port number to use for this connection.
+ def port
+ options[:port] || 22
+ end
+
+ # Gives server definitions a sort order, and allows comparison.
+ def <=>(server)
+ [host, port, user] <=> [server.host, server.port, server.user]
+ end
+
+ alias :eql? :==
+
+ # Generates a +Fixnum+ hash value for this object. This function has the
+ # property that +a.eql?(b)+ implies +a.hash == b.hash+. The
+ # hash value is used by class +Hash+. Any hash value that exceeds the
+ # capacity of a +Fixnum+ will be truncated before being used.
+ def hash
+ @hash ||= [host, user, port].hash
+ end
+
+ # Returns a human-readable representation of this server instance.
+ def to_s
+ @to_s ||= begin
+ s = "#{user}@#{host}"
+ s << ":#{options[:port]}" if options[:port]
+ s
+ end
+ end
+
+ # Returns a human-readable representation of this server instance.
+ def inspect
+ @inspect ||= "#<%s:0x%x %s>" % [self.class.name, object_id, to_s]
+ end
+
+ # Returns +true+ if this server has ever failed a connection attempt.
+ def failed?
+ @failed
+ end
+
+ # Indicates (by default) that this server has just failed a connection
+ # attempt. If +flag+ is false, this can be used to reset the failed flag
+ # so that a retry may be attempted.
+ def fail!(flag=true)
+ @failed = flag
+ end
+
+ # Returns the Net::SSH session object for this server. If +require_session+
+ # is false and the session has not previously been created, this will
+ # return +nil+. If +require_session+ is true, the session will be instantiated
+ # if it has not already been instantiated, via the +gateway+ if one is
+ # given, or directly (via Net::SSH::start) otherwise.
+ #
+ # if server.session.nil?
+ # puts "connecting..."
+ # server.session(true)
+ # end
+ #
+ # Note that the sessions returned by this are "enhanced" slightly, to make
+ # them easier to deal with in a multi-session environment: they have a
+ # :server property automatically set on them, that refers to this object
+ # (the Server instance that spawned them).
+ #
+ # assert_equal server, server.session[:server]
+ def session(require_session=false)
+ return @session if @session || !require_session
+ @session ||= master.next_session(self)
+ end
+
+ # Returns +true+ if the session has been opened, and the session is currently
+ # busy (as defined by Net::SSH::Connection::Session#busy?).
+ def busy?(include_invisible=false)
+ session && session.busy?(include_invisible)
+ end
+
+ # Closes this server's session. If the session has not yet been opened,
+ # this does nothing.
+ def close
+ session.close if session
+ ensure
+ master.server_closed(self) if session
+ @session = nil
+ end
+
+ public # but not published, e.g., these are used internally only...
+
+ # Indicate that the session currently in use by this server instance
+ # should be replaced by the given +session+ argument. This is used when
+ # a pending session has been "realized". Note that this does not
+ # actually replace the session--see #update_session! for that.
+ def replace_session(session) #:nodoc:
+ @ready_session = session
+ end
+
+ # If a new session has been made ready (see #replace_session), this
+ # will replace the current session with the "ready" session. This
+ # method is called from the event loop to ensure that sessions are
+ # swapped in at the appropriate point (instead of in the middle of an
+ # event poll).
+ def update_session! #:nodoc:
+ if @ready_session
+ @session, @ready_session = @ready_session, nil
+ end
+ end
+
+ # Returns a new session object based on this server's connection
+ # criteria. Note that this will not associate the session with the
+ # server, and should not be called directly; it is called internally
+ # from Net::SSH::Multi::Session when a new session is required.
+ def new_session #:nodoc:
+ session = if gateway
+ gateway.ssh(host, user, options)
+ else
+ Net::SSH.start(host, user, options)
+ end
+
+ session[:server] = self
+ session
+ rescue ::Timeout::Error => error
+ raise Net::SSH::ConnectionTimeout.new("#{error.message} for #{host}")
+ rescue Net::SSH::AuthenticationFailed => error
+ raise Net::SSH::AuthenticationFailed.new("#{error.message}@#{host}")
+ end
+
+ # Closes all open channels on this server's session. If the session has
+ # not yet been opened, this does nothing.
+ def close_channels #:nodoc:
+ session.channels.each { |id, channel| channel.close } if session
+ end
+
+ # Runs the session's preprocess action, if the session has been opened.
+ def preprocess #:nodoc:
+ session.preprocess if session
+ end
+
+ # Returns all registered readers on the session, or an empty array if the
+ # session is not open.
+ def readers #:nodoc:
+ return [] unless session
+ session.listeners.keys.reject { |io| io.closed? }
+ end
+
+ # Returns all registered and pending writers on the session, or an empty
+ # array if the session is not open.
+ def writers #:nodoc:
+ readers.select do |io|
+ io.respond_to?(:pending_write?) && io.pending_write?
+ end
+ end
+
+ # Runs the post-process action on the session, if the session has been
+ # opened. Only the +readers+ and +writers+ that actually belong to this
+ # session will be postprocessed by this server.
+ def postprocess(readers, writers) #:nodoc:
+ return true unless session
+ listeners = session.listeners.keys
+ session.postprocess(listeners & readers, listeners & writers)
+ end
+ end
+end; end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/server_list.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/server_list.rb
new file mode 100644
index 0000000..da1914f
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/server_list.rb
@@ -0,0 +1,80 @@
+require 'net/ssh/multi/server'
+require 'net/ssh/multi/dynamic_server'
+
+module Net; module SSH; module Multi
+
+ # Encapsulates a list of server objects, both dynamic (Net::SSH::Multi::DynamicServer)
+ # and static (Net::SSH::Multi::Server). It attempts to make it transparent whether
+ # a dynamic server set has been evaluated or not. Note that a ServerList is
+ # NOT an Array, though it is Enumerable.
+ class ServerList
+ include Enumerable
+
+ # Create a new ServerList that wraps the given server list. Duplicate entries
+ # will be discarded.
+ def initialize(list=[])
+ @list = list.uniq
+ end
+
+ # Adds the given server to the list, and returns the argument. If an
+ # identical server definition already exists in the collection, the
+ # argument is _not_ added, and the existing server record is returned
+ # instead.
+ def add(server)
+ index = @list.index(server)
+ if index
+ server = @list[index]
+ else
+ @list.push(server)
+ end
+ server
+ end
+
+ # Adds an array (or otherwise Enumerable list) of servers to this list, by
+ # calling #add for each argument. Returns +self+.
+ def concat(servers)
+ servers.each { |server| add(server) }
+ self
+ end
+
+ # Iterates over each distinct server record in the collection. This will
+ # correctly iterate over server records instantiated by a DynamicServer
+ # as well, but only if the dynamic server has been "evaluated" (see
+ # Net::SSH::Multi::DynamicServer#evaluate!).
+ def each
+ @list.each do |server|
+ case server
+ when Server then yield server
+ when DynamicServer then server.each { |item| yield item }
+ else raise ArgumentError, "server list contains non-server: #{server.class}"
+ end
+ end
+ self
+ end
+
+ # Works exactly as Enumerable#select, but returns the result as a new
+ # ServerList instance.
+ def select
+ subset = @list.select { |i| yield i }
+ ServerList.new(subset)
+ end
+
+ # Returns an array of all servers in the list, with dynamic server records
+ # expanded. The result is an array of distinct server records (duplicates
+ # are removed from the result).
+ def flatten
+ result = @list.inject([]) do |aggregator, server|
+ case server
+ when Server then aggregator.push(server)
+ when DynamicServer then aggregator.concat(server)
+ else raise ArgumentError, "server list contains non-server: #{server.class}"
+ end
+ end
+
+ result.uniq
+ end
+
+ alias to_ary flatten
+ end
+
+end; end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb
new file mode 100644
index 0000000..333fdf3
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/session.rb
@@ -0,0 +1,551 @@
+require 'thread'
+require 'net/ssh/gateway'
+require 'net/ssh/multi/server'
+require 'net/ssh/multi/dynamic_server'
+require 'net/ssh/multi/server_list'
+require 'net/ssh/multi/channel'
+require 'net/ssh/multi/pending_connection'
+require 'net/ssh/multi/session_actions'
+require 'net/ssh/multi/subsession'
+
+module Net; module SSH; module Multi
+ # Represents a collection of connections to various servers. It provides an
+ # interface for organizing the connections (#group), as well as a way to
+ # scope commands to a subset of all connections (#with). You can also provide
+ # a default gateway connection that servers should use when connecting
+ # (#via). It exposes an interface similar to Net::SSH::Connection::Session
+ # for opening SSH channels and executing commands, allowing for these
+ # operations to be done in parallel across multiple connections.
+ #
+ # Net::SSH::Multi.start do |session|
+ # # access servers via a gateway
+ # session.via 'gateway', 'gateway-user'
+ #
+ # # define the servers we want to use
+ # session.use 'user1@host1'
+ # session.use 'user2@host2'
+ #
+ # # define servers in groups for more granular access
+ # session.group :app do
+ # session.use 'user@app1'
+ # session.use 'user@app2'
+ # end
+ #
+ # # execute commands on all servers
+ # session.exec "uptime"
+ #
+ # # execute commands on a subset of servers
+ # session.with(:app).exec "hostname"
+ #
+ # # run the aggregated event loop
+ # session.loop
+ # end
+ #
+ # Note that connections are established lazily, as soon as they are needed.
+ # You can force the connections to be opened immediately, though, using the
+ # #connect! method.
+ #
+ # == Concurrent Connection Limiting
+ #
+ # Sometimes you may be dealing with a large number of servers, and if you
+ # try to have connections open to all of them simultaneously you'll run into
+ # open file handle limitations and such. If this happens to you, you can set
+ # the #concurrent_connections property of the session. Net::SSH::Multi will
+ # then ensure that no more than this number of connections are ever open
+ # simultaneously.
+ #
+ # Net::SSH::Multi.start(:concurrent_connections => 5) do |session|
+ # # ...
+ # end
+ #
+ # Opening channels and executing commands will still work exactly as before,
+ # but Net::SSH::Multi will transparently close finished connections and open
+ # pending ones.
+ #
+ # == Controlling Connection Errors
+ #
+ # By default, Net::SSH::Multi will raise an exception if a connection error
+ # occurs when connecting to a server. This will typically bubble up and abort
+ # the entire connection process. Sometimes, however, you might wish to ignore
+ # connection errors, for instance when starting a daemon on a large number of
+ # boxes and you know that some of the boxes are going to be unavailable.
+ #
+ # To do this, simply set the #on_error property of the session to :ignore
+ # (or to :warn, if you want a warning message when a connection attempt
+ # fails):
+ #
+ # Net::SSH::Multi.start(:on_error => :ignore) do |session|
+ # # ...
+ # end
+ #
+ # The default is :fail, which causes the exception to bubble up. Additionally,
+ # you can specify a Proc object as the value for #on_error, which will be
+ # invoked with the server in question if the connection attempt fails. You
+ # can force the connection attempt to retry by throwing the :go symbol, with
+ # :retry as the payload, or force the exception to be reraised by throwing
+ # :go with :raise as the payload:
+ #
+ # handler = Proc.new do |server|
+ # server[:connection_attempts] ||= 0
+ # if server[:connection_attempts] < 3
+ # server[:connection_attempts] += 1
+ # throw :go, :retry
+ # else
+ # throw :go, :raise
+ # end
+ # end
+ #
+ # Net::SSH::Multi.start(:on_error => handler) do |session|
+ # # ...
+ # end
+ #
+ # Any other thrown value (or no thrown value at all) will result in the
+ # failure being ignored.
+ #
+ # == Lazily Evaluated Server Definitions
+ #
+ # Sometimes you might be dealing with an environment where you don't know the
+ # names or addresses of the servers until runtime. You can certainly dynamically
+ # build server names and pass them to #use, but if the operation to determine
+ # the server names is expensive, you might want to defer it until the server
+ # is actually needed (especially if the logic of your program is such that
+ # you might not even need to connect to that server every time the program
+ # runs).
+ #
+ # You can do this by passing a block to #use:
+ #
+ # session.use do |opt|
+ # lookup_ip_address_of_remote_host
+ # end
+ #
+ # See #use for more information about this usage.
+ class Session
+ include SessionActions
+
+ # The Net::SSH::Multi::ServerList managed by this session.
+ attr_reader :server_list
+
+ # The default Net::SSH::Gateway instance to use to connect to the servers.
+ # If +nil+, no default gateway will be used.
+ attr_reader :default_gateway
+
+ # The hash of group definitions, mapping each group name to a corresponding
+ # Net::SSH::Multi::ServerList.
+ attr_reader :groups
+
+ # The number of allowed concurrent connections. No more than this number
+ # of sessions will be open at any given time.
+ attr_accessor :concurrent_connections
+
+ # How connection errors should be handled. This defaults to :fail, but
+ # may be set to :ignore if connection errors should be ignored, or
+ # :warn if connection errors should cause a warning.
+ attr_accessor :on_error
+
+ # The default user name to use when connecting to a server. If a user name
+ # is not given for a particular server, this value will be used. It defaults
+ # to ENV['USER'] || ENV['USERNAME'], or "unknown" if neither of those are
+ # set.
+ attr_accessor :default_user
+
+ # The number of connections that are currently open.
+ attr_reader :open_connections #:nodoc:
+
+ # The list of "open" groups, which will receive subsequent server definitions.
+ # See #use and #group.
+ attr_reader :open_groups #:nodoc:
+
+ # Creates a new Net::SSH::Multi::Session instance. Initially, it contains
+ # no server definitions, no group definitions, and no default gateway.
+ #
+ # You can set the #concurrent_connections property in the options. Setting
+ # it to +nil+ (the default) will cause Net::SSH::Multi to ignore any
+ # concurrent connection limit and allow all defined sessions to be open
+ # simultaneously. Setting it to an integer will cause Net::SSH::Multi to
+ # allow no more than that number of concurrently open sessions, opening
+ # subsequent sessions only when other sessions finish and close.
+ #
+ # Net::SSH::Multi.start(:concurrent_connections => 10) do |session|
+ # session.use ...
+ # end
+ def initialize(options={})
+ @server_list = ServerList.new
+ @groups = Hash.new { |h,k| h[k] = ServerList.new }
+ @gateway = nil
+ @open_groups = []
+ @connect_threads = []
+ @on_error = :fail
+ @default_user = ENV['USER'] || ENV['USERNAME'] || "unknown"
+
+ @open_connections = 0
+ @pending_sessions = []
+ @session_mutex = Mutex.new
+
+ options.each { |opt, value| send("#{opt}=", value) }
+ end
+
+ # At its simplest, this associates a named group with a server definition.
+ # It can be used in either of two ways:
+ #
+ # First, you can use it to associate a group (or array of groups) with a
+ # server definition (or array of server definitions). The server definitions
+ # must already exist in the #server_list array (typically by calling #use):
+ #
+ # server1 = session.use('host1', 'user1')
+ # server2 = session.use('host2', 'user2')
+ # session.group :app => server1, :web => server2
+ # session.group :staging => [server1, server2]
+ # session.group %w(xen linux) => server2
+ # session.group %w(rackspace backup) => [server1, server2]
+ #
+ # Secondly, instead of a mapping of groups to servers, you can just
+ # provide a list of group names, and then a block. Inside the block, any
+ # calls to #use will automatically associate the new server definition with
+ # those groups. You can nest #group calls, too, which will aggregate the
+ # group definitions.
+ #
+ # session.group :rackspace, :backup do
+ # session.use 'host1', 'user1'
+ # session.group :xen do
+ # session.use 'host2', 'user2'
+ # end
+ # end
+ def group(*args)
+ mapping = args.last.is_a?(Hash) ? args.pop : {}
+
+ if mapping.any? && block_given?
+ raise ArgumentError, "must provide group mapping OR block, not both"
+ elsif block_given?
+ begin
+ saved_groups = open_groups.dup
+ open_groups.concat(args.map { |a| a.to_sym }).uniq!
+ yield self
+ ensure
+ open_groups.replace(saved_groups)
+ end
+ else
+ mapping.each do |key, value|
+ (open_groups + Array(key)).uniq.each do |grp|
+ groups[grp.to_sym].concat(Array(value))
+ end
+ end
+ end
+ end
+
+ # Sets up a default gateway to use when establishing connections to servers.
+ # Note that any servers defined prior to this invocation will not use the
+ # default gateway; it only affects servers defined subsequently.
+ #
+ # session.via 'gateway.host', 'user'
+ #
+ # You may override the default gateway on a per-server basis by passing the
+ # :via key to the #use method; see #use for details.
+ def via(host, user, options={})
+ @default_gateway = Net::SSH::Gateway.new(host, user, options)
+ self
+ end
+
+ # Defines a new server definition, to be managed by this session. The
+ # server is at the given +host+, and will be connected to as the given
+ # +user+. The other options are passed as-is to the Net::SSH session
+ # constructor.
+ #
+ # If a default gateway has been specified previously (with #via) it will
+ # be passed to the new server definition. You can override this by passing
+ # a different Net::SSH::Gateway instance (or +nil+) with the :via key in
+ # the +options+.
+ #
+ # session.use 'host'
+ # session.use 'user@host2', :via => nil
+ # session.use 'host3', :user => "user3", :via => Net::SSH::Gateway.new('gateway.host', 'user')
+ #
+ # If only a single host is given, the new server instance is returned. You
+ # can give multiple hosts at a time, though, in which case an array of
+ # server instances will be returned.
+ #
+ # server1, server2 = session.use "host1", "host2"
+ #
+ # If given a block, this will save the block as a Net::SSH::Multi::DynamicServer
+ # definition, to be evaluated lazily the first time the server is needed.
+ # The block will recive any options hash given to #use, and should return
+ # +nil+ (if no servers are to be added), a String or an array of Strings
+ # (to be interpreted as a connection specification), or a Server or an
+ # array of Servers.
+ def use(*hosts, &block)
+ options = hosts.last.is_a?(Hash) ? hosts.pop : {}
+ options = { :via => default_gateway }.merge(options)
+
+ results = hosts.map do |host|
+ server_list.add(Server.new(self, host, options))
+ end
+
+ if block
+ results << server_list.add(DynamicServer.new(self, options, block))
+ end
+
+ group [] => results
+ results.length > 1 ? results : results.first
+ end
+
+ # Essentially an alias for #servers_for without any arguments. This is used
+ # primarily to satistfy the expectations of the Net::SSH::Multi::SessionActions
+ # module.
+ def servers
+ servers_for
+ end
+
+ # Returns the set of servers that match the given criteria. It can be used
+ # in any (or all) of three ways.
+ #
+ # First, you can omit any arguments. In this case, the full list of servers
+ # will be returned.
+ #
+ # all = session.servers_for
+ #
+ # Second, you can simply specify a list of group names. All servers in all
+ # named groups will be returned. If a server belongs to multiple matching
+ # groups, then it will appear only once in the list (the resulting list
+ # will contain only unique servers).
+ #
+ # servers = session.servers_for(:app, :db)
+ #
+ # Last, you can specify a hash with group names as keys, and property
+ # constraints as the values. These property constraints are either "only"
+ # constraints (which restrict the set of servers to "only" those that match
+ # the given properties) or "except" constraints (which restrict the set of
+ # servers to those whose properties do _not_ match). Properties are described
+ # when the server is defined (via the :properties key):
+ #
+ # session.group :db do
+ # session.use 'dbmain', 'user', :properties => { :primary => true }
+ # session.use 'dbslave', 'user2'
+ # session.use 'dbslve2', 'user2'
+ # end
+ #
+ # # return ONLY on the servers in the :db group which have the :primary
+ # # property set to true.
+ # primary = session.servers_for(:db => { :only => { :primary => true } })
+ #
+ # You can, naturally, combine these methods:
+ #
+ # # all servers in :app and :web, and all servers in :db with the
+ # # :primary property set to true
+ # servers = session.servers_for(:app, :web, :db => { :only => { :primary => true } })
+ def servers_for(*criteria)
+ if criteria.empty?
+ server_list.flatten
+ else
+ # normalize the criteria list, so that every entry is a key to a
+ # criteria hash (possibly empty).
+ criteria = criteria.inject({}) do |hash, entry|
+ case entry
+ when Hash then hash.merge(entry)
+ else hash.merge(entry => {})
+ end
+ end
+
+ list = criteria.inject([]) do |aggregator, (group, properties)|
+ raise ArgumentError, "the value for any group must be a Hash, but got a #{properties.class} for #{group.inspect}" unless properties.is_a?(Hash)
+ bad_keys = properties.keys - [:only, :except]
+ raise ArgumentError, "unknown constraint(s) #{bad_keys.inspect} for #{group.inspect}" unless bad_keys.empty?
+
+ servers = groups[group].select do |server|
+ (properties[:only] || {}).all? { |prop, value| server[prop] == value } &&
+ !(properties[:except] || {}).any? { |prop, value| server[prop] == value }
+ end
+
+ aggregator.concat(servers)
+ end
+
+ list.uniq
+ end
+ end
+
+ # Returns a new Net::SSH::Multi::Subsession instance consisting of the
+ # servers that meet the given criteria. If a block is given, the
+ # subsession will be yielded to it. See #servers_for for a discussion of
+ # how these criteria are interpreted.
+ #
+ # session.with(:app).exec('hostname')
+ #
+ # session.with(:app, :db => { :primary => true }) do |s|
+ # s.exec 'date'
+ # s.exec 'uptime'
+ # end
+ def with(*groups)
+ subsession = Subsession.new(self, servers_for(*groups))
+ yield subsession if block_given?
+ subsession
+ end
+
+ # Works as #with, but for specific servers rather than groups. It will
+ # return a new subsession (Net::SSH::Multi::Subsession) consisting of
+ # the given servers. (Note that it requires that the servers in question
+ # have been created via calls to #use on this session object, or things
+ # will not work quite right.) If a block is given, the new subsession
+ # will also be yielded to the block.
+ #
+ # srv1 = session.use('host1', 'user')
+ # srv2 = session.use('host2', 'user')
+ # # ...
+ # session.on(srv1, srv2).exec('hostname')
+ def on(*servers)
+ subsession = Subsession.new(self, servers)
+ yield subsession if block_given?
+ subsession
+ end
+
+ # Closes the multi-session by shutting down all open server sessions, and
+ # the default gateway (if one was specified using #via). Note that other
+ # gateway connections (e.g., those passed to #use directly) will _not_ be
+ # closed by this method, and must be managed externally.
+ def close
+ server_list.each { |server| server.close_channels }
+ loop(0) { busy?(true) }
+ server_list.each { |server| server.close }
+ default_gateway.shutdown! if default_gateway
+ end
+
+ alias :loop_forever :loop
+
+ # Run the aggregated event loop for all open server sessions, until the given
+ # block returns +false+. If no block is given, the loop will run for as
+ # long as #busy? returns +true+ (in other words, for as long as there are
+ # any (non-invisible) channels open).
+ def loop(wait=nil, &block)
+ running = block || Proc.new { |c| busy? }
+ loop_forever { break unless process(wait, &running) }
+ end
+
+ # Run a single iteration of the aggregated event loop for all open server
+ # sessions. The +wait+ parameter indicates how long to wait for an event
+ # to appear on any of the different sessions; +nil+ (the default) means
+ # "wait forever". If the block is given, then it will be used to determine
+ # whether #process returns +true+ (the block did not return +false+), or
+ # +false+ (the block returned +false+).
+ def process(wait=nil, &block)
+ realize_pending_connections!
+ wait = @connect_threads.any? ? 0 : wait
+
+ return false unless preprocess(&block)
+
+ readers = server_list.map { |s| s.readers }.flatten
+ writers = server_list.map { |s| s.writers }.flatten
+
+ readers, writers, = IO.select(readers, writers, nil, wait)
+
+ if readers
+ return postprocess(readers, writers)
+ else
+ return true
+ end
+ end
+
+ # Runs the preprocess stage on all servers. Returns false if the block
+ # returns false, and true if there either is no block, or it returns true.
+ # This is called as part of the #process method.
+ def preprocess(&block) #:nodoc:
+ return false if block && !block[self]
+ server_list.each { |server| server.preprocess }
+ block.nil? || block[self]
+ end
+
+ # Runs the postprocess stage on all servers. Always returns true. This is
+ # called as part of the #process method.
+ def postprocess(readers, writers) #:nodoc:
+ server_list.each { |server| server.postprocess(readers, writers) }
+ true
+ end
+
+ # Takes the #concurrent_connections property into account, and tries to
+ # return a new session for the given server. If the concurrent connections
+ # limit has been reached, then a Net::SSH::Multi::PendingConnection instance
+ # will be returned instead, which will be realized into an actual session
+ # as soon as a slot opens up.
+ #
+ # If +force+ is true, the concurrent_connections check is skipped and a real
+ # connection is always returned.
+ def next_session(server, force=false) #:nodoc:
+ # don't retry a failed attempt
+ return nil if server.failed?
+
+ @session_mutex.synchronize do
+ if !force && concurrent_connections && concurrent_connections <= open_connections
+ connection = PendingConnection.new(server)
+ @pending_sessions << connection
+ return connection
+ end
+
+ @open_connections += 1
+ end
+
+ begin
+ server.new_session
+
+ # I don't understand why this should be necessary--StandardError is a
+ # subclass of Exception, after all--but without explicitly rescuing
+ # StandardError, things like Errno::* and SocketError don't get caught
+ # here!
+ rescue Exception, StandardError => e
+ server.fail!
+ @session_mutex.synchronize { @open_connections -= 1 }
+
+ case on_error
+ when :ignore then
+ # do nothing
+ when :warn then
+ warn("error connecting to #{server}: #{e.class} (#{e.message})")
+ when Proc then
+ go = catch(:go) { on_error.call(server); nil }
+ case go
+ when nil, :ignore then # nothing
+ when :retry then retry
+ when :raise then raise
+ else warn "unknown 'go' command: #{go.inspect}"
+ end
+ else
+ raise
+ end
+
+ return nil
+ end
+ end
+
+ # Tells the session that the given server has closed its connection. The
+ # session indicates that a new connection slot is available, which may be
+ # filled by the next pending connection on the next event loop iteration.
+ def server_closed(server) #:nodoc:
+ @session_mutex.synchronize do
+ unless @pending_sessions.delete(server.session)
+ @open_connections -= 1
+ end
+ end
+ end
+
+ # Invoked by the event loop. If there is a concurrent_connections limit in
+ # effect, this will close any non-busy sessions and try to open as many
+ # new sessions as it can. It does this in threads, so that existing processing
+ # can continue.
+ #
+ # If there is no concurrent_connections limit in effect, then this method
+ # does nothing.
+ def realize_pending_connections! #:nodoc:
+ return unless concurrent_connections
+
+ server_list.each do |server|
+ server.close if !server.busy?(true)
+ server.update_session!
+ end
+
+ @connect_threads.delete_if { |t| !t.alive? }
+
+ count = concurrent_connections ? (concurrent_connections - open_connections) : @pending_sessions.length
+ count.times do
+ session = @pending_sessions.pop or break
+ @connect_threads << Thread.new do
+ session.replace_with(next_session(session.server, true))
+ end
+ end
+ end
+ end
+end; end; end
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb
new file mode 100644
index 0000000..2d87392
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/session_actions.rb
@@ -0,0 +1,153 @@
+module Net; module SSH; module Multi
+
+ # This module represents the actions that are available on session
+ # collections. Any class that includes this module needs only provide a
+ # +servers+ method that returns a list of Net::SSH::Multi::Server
+ # instances, and the rest just works. See Net::SSH::Multi::Session and
+ # Net::SSH::Multi::Subsession for consumers of this module.
+ module SessionActions
+ # Returns the session that is the "master". This defaults to +self+, but
+ # classes that include this module may wish to change this if they are
+ # subsessions that depend on a master session.
+ def master
+ self
+ end
+
+ # Connections are normally established lazily, as soon as they are needed.
+ # This method forces all servers in the current container to have their
+ # connections established immediately, blocking until the connections have
+ # been made.
+ def connect!
+ sessions
+ self
+ end
+
+ # Returns +true+ if any server in the current container has an open SSH
+ # session that is currently processing any channels. If +include_invisible+
+ # is +false+ (the default) then invisible channels (such as those created
+ # by port forwarding) will not be counted; otherwise, they will be.
+ def busy?(include_invisible=false)
+ servers.any? { |server| server.busy?(include_invisible) }
+ end
+
+ # Returns an array of all SSH sessions, blocking until all sessions have
+ # connected.
+ def sessions
+ threads = servers.map { |server| Thread.new { server.session(true) } if server.session.nil? }
+ threads.each { |thread| thread.join if thread }
+ servers.map { |server| server.session }.compact
+ end
+
+ # Sends a global request to the sessions for all contained servers
+ # (see #sessions). This can be used to (e.g.) ping the remote servers to
+ # prevent them from timing out.
+ #
+ # session.send_global_request("keep-alive@openssh.com")
+ #
+ # If a block is given, it will be invoked when the server responds, with
+ # two arguments: the Net::SSH connection that is responding, and a boolean
+ # indicating whether the request succeeded or not.
+ def send_global_request(type, *extra, &callback)
+ sessions.each { |ssh| ssh.send_global_request(type, *extra, &callback) }
+ self
+ end
+
+ # Asks all sessions for all contained servers (see #sessions) to open a
+ # new channel. When each server responds, the +on_confirm+ block will be
+ # invoked with a single argument, the channel object for that server. This
+ # means that the block will be invoked one time for each session.
+ #
+ # All new channels will be collected and returned, aggregated into a new
+ # Net::SSH::Multi::Channel instance.
+ #
+ # Note that the channels are "enhanced" slightly--they have two properties
+ # set on them automatically, to make dealing with them in a multi-session
+ # environment slightly easier:
+ #
+ # * :server => the Net::SSH::Multi::Server instance that spawned the channel
+ # * :host => the host name of the server
+ #
+ # Having access to these things lets you more easily report which host
+ # (e.g.) data was received from:
+ #
+ # session.open_channel do |channel|
+ # channel.exec "command" do |ch, success|
+ # ch.on_data do |ch, data|
+ # puts "got data #{data} from #{ch[:host]}"
+ # end
+ # end
+ # end
+ def open_channel(type="session", *extra, &on_confirm)
+ channels = sessions.map do |ssh|
+ ssh.open_channel(type, *extra) do |c|
+ c[:server] = c.connection[:server]
+ c[:host] = c.connection[:server].host
+ on_confirm[c] if on_confirm
+ end
+ end
+ Multi::Channel.new(master, channels)
+ end
+
+ # A convenience method for executing a command on multiple hosts and
+ # either displaying or capturing the output. It opens a channel on all
+ # active sessions (see #open_channel and #active_sessions), and then
+ # executes a command on each channel (Net::SSH::Connection::Channel#exec).
+ #
+ # If a block is given, it will be invoked whenever data is received across
+ # the channel, with three arguments: the channel object, a symbol identifying
+ # which output stream the data was received on (+:stdout+ or +:stderr+)
+ # and a string containing the data that was received:
+ #
+ # session.exec("command") do |ch, stream, data|
+ # puts "[#{ch[:host]} : #{stream}] #{data}"
+ # end
+ #
+ # If no block is given, all output will be written to +$stdout+ or
+ # +$stderr+, as appropriate.
+ #
+ # Note that #exec will also capture the exit status of the process in the
+ # +:exit_status+ property of each channel. Since #exec returns all of the
+ # channels in a Net::SSH::Multi::Channel object, you can check for the
+ # exit status like this:
+ #
+ # channel = session.exec("command") { ... }
+ # channel.wait
+ #
+ # if channel.any? { |c| c[:exit_status] != 0 }
+ # puts "executing failed on at least one host!"
+ # end
+ def exec(command, &block)
+ open_channel do |channel|
+ channel.exec(command) do |ch, success|
+ raise "could not execute command: #{command.inspect} (#{ch[:host]})" unless success
+
+ channel.on_data do |ch, data|
+ if block
+ block.call(ch, :stdout, data)
+ else
+ data.chomp.each_line do |line|
+ $stdout.puts("[#{ch[:host]}] #{line}")
+ end
+ end
+ end
+
+ channel.on_extended_data do |ch, type, data|
+ if block
+ block.call(ch, :stderr, data)
+ else
+ data.chomp.each_line do |line|
+ $stderr.puts("[#{ch[:host]}] #{line}")
+ end
+ end
+ end
+
+ channel.on_request("exit-status") do |ch, data|
+ ch[:exit_status] = data.read_long
+ end
+ end
+ end
+ end
+
+ end
+
+end; end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/subsession.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/subsession.rb
new file mode 100644
index 0000000..29e7866
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/subsession.rb
@@ -0,0 +1,48 @@
+require 'net/ssh/multi/session_actions'
+
+module Net; module SSH; module Multi
+
+ # A trivial class for representing a subset of servers. It is used
+ # internally for restricting operations to a subset of all defined
+ # servers.
+ #
+ # subsession = session.with(:app)
+ # subsession.exec("hostname")
+ class Subsession
+ include SessionActions
+
+ # The master session that spawned this subsession.
+ attr_reader :master
+
+ # The list of servers that this subsession can operate on.
+ attr_reader :servers
+
+ # Create a new subsession of the given +master+ session, that operates
+ # on the given +server_list+.
+ def initialize(master, server_list)
+ @master = master
+ @servers = server_list.uniq
+ end
+
+ # Works as Array#slice, but returns a new subsession consisting of the
+ # given slice of servers in this subsession. The new subsession will have
+ # the same #master session as this subsession does.
+ #
+ # s1 = subsession.slice(0)
+ # s2 = subsession.slice(3, -1)
+ # s3 = subsession.slice(1..4)
+ def slice(*args)
+ Subsession.new(master, Array(servers.slice(*args)))
+ end
+
+ # Returns a new subsession that consists of only the first server in the
+ # server list of the current subsession. This is just convenience for
+ # #slice(0):
+ #
+ # s1 = subsession.first
+ def first
+ slice(0)
+ end
+ end
+
+end; end; end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/version.rb b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/version.rb
new file mode 100644
index 0000000..5b1bf82
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/lib/net/ssh/multi/version.rb
@@ -0,0 +1,21 @@
+require 'net/ssh/version'
+
+module Net; module SSH; module Multi
+ # A trivial class for representing the version of this library.
+ class Version < Net::SSH::Version
+ # The major component of the library's version
+ MAJOR = 1
+
+ # The minor component of the library's version
+ MINOR = 1
+
+ # The tiny component of the library's version
+ TINY = 0
+
+ # The library's version as a Version instance
+ CURRENT = new(MAJOR, MINOR, TINY)
+
+ # The library's version as a String instance
+ STRING = CURRENT.to_s
+ end
+end; end; end
diff --git a/pkg/net-ssh-multi-1.1/test/channel_test.rb b/pkg/net-ssh-multi-1.1/test/channel_test.rb
new file mode 100644
index 0000000..174b22c
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/test/channel_test.rb
@@ -0,0 +1,152 @@
+require 'common'
+require 'net/ssh/multi/channel'
+
+class ChannelTest < Test::Unit::TestCase
+ def test_each_should_iterate_over_each_component_channel
+ channels = [c1 = mock('channel'), c2 = mock('channel'), c3 = mock('channel')]
+ channel = Net::SSH::Multi::Channel.new(mock('session'), channels)
+ result = []
+ channel.each { |c| result << c }
+ assert_equal channels, result
+ end
+
+ def test_property_accessors
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [])
+ channel[:foo] = "hello"
+ assert_equal "hello", channel[:foo]
+ channel['bar'] = "goodbye"
+ assert_equal "goodbye", channel['bar']
+ assert_nil channel[:bar]
+ assert_nil channel['foo']
+ end
+
+ def test_exec_should_delegate_to_component_channels
+ c1, c2, results = mock('channel'), mock('channel'), []
+ c1.expects(:exec).with('ls -l').yields(c1)
+ c2.expects(:exec).with('ls -l').yields(c2)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.exec('ls -l') { |c| results << c }
+ assert_equal [c1, c2], results
+ end
+
+ def test_request_pty_should_delegate_to_component_channels
+ c1, c2, results = mock('channel'), mock('channel'), []
+ c1.expects(:request_pty).with(:foo => 5).yields(c1)
+ c2.expects(:request_pty).with(:foo => 5).yields(c2)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.request_pty(:foo => 5) { |c| results << c }
+ assert_equal [c1, c2], results
+ end
+
+ def test_send_data_should_delegate_to_component_channels
+ c1, c2 = mock('channel'), mock('channel')
+ c1.expects(:send_data).with("hello\n")
+ c2.expects(:send_data).with("hello\n")
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.send_data("hello\n")
+ end
+
+ def test_active_should_be_true_if_all_component_channels_are_active
+ c1, c2, c3 = stub('channel', :active? => true), stub('channel', :active? => true), stub('channel', :active? => true)
+ channel = Net::SSH::Multi::Channel.new(stub('session'), [c1, c2, c3])
+ assert channel.active?
+ end
+
+ def test_active_should_be_true_if_any_component_channels_are_active
+ c1, c2, c3 = stub('channel', :active? => true), stub('channel', :active? => false), stub('channel', :active? => false)
+ channel = Net::SSH::Multi::Channel.new(stub('session'), [c1, c2, c3])
+ assert channel.active?
+ end
+
+ def test_active_should_be_false_if_no_component_channels_are_active
+ c1, c2, c3 = stub('channel', :active? => false), stub('channel', :active? => false), stub('channel', :active? => false)
+ channel = Net::SSH::Multi::Channel.new(stub('session'), [c1, c2, c3])
+ assert !channel.active?
+ end
+
+ def test_wait_should_block_until_active_is_false
+ channel = Net::SSH::Multi::Channel.new(MockSession.new, [])
+ channel.expects(:active?).times(4).returns(true,true,true,false)
+ assert_equal channel, channel.wait
+ end
+
+ def test_close_should_delegate_to_component_channels
+ c1, c2 = mock('channel'), mock('channel')
+ c1.expects(:close)
+ c2.expects(:close)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.close
+ end
+
+ def test_eof_bang_should_delegate_to_component_channels
+ c1, c2 = mock('channel'), mock('channel')
+ c1.expects(:eof!)
+ c2.expects(:eof!)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.eof!
+ end
+
+ def test_on_data_should_delegate_to_component_channels
+ c1, c2, results = mock('channel'), mock('channel'), []
+ c1.expects(:on_data).yields(c1)
+ c2.expects(:on_data).yields(c2)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.on_data { |c| results << c }
+ assert_equal [c1, c2], results
+ end
+
+ def test_on_extended_data_should_delegate_to_component_channels
+ c1, c2, results = mock('channel'), mock('channel'), []
+ c1.expects(:on_extended_data).yields(c1)
+ c2.expects(:on_extended_data).yields(c2)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.on_extended_data { |c| results << c }
+ assert_equal [c1, c2], results
+ end
+
+ def test_on_process_should_delegate_to_component_channels
+ c1, c2, results = mock('channel'), mock('channel'), []
+ c1.expects(:on_process).yields(c1)
+ c2.expects(:on_process).yields(c2)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.on_process { |c| results << c }
+ assert_equal [c1, c2], results
+ end
+
+ def test_on_close_should_delegate_to_component_channels
+ c1, c2, results = mock('channel'), mock('channel'), []
+ c1.expects(:on_close).yields(c1)
+ c2.expects(:on_close).yields(c2)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.on_close { |c| results << c }
+ assert_equal [c1, c2], results
+ end
+
+ def test_on_eof_should_delegate_to_component_channels
+ c1, c2, results = mock('channel'), mock('channel'), []
+ c1.expects(:on_eof).yields(c1)
+ c2.expects(:on_eof).yields(c2)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.on_eof { |c| results << c }
+ assert_equal [c1, c2], results
+ end
+
+ def test_on_request_should_delegate_to_component_channels
+ c1, c2, results = mock('channel'), mock('channel'), []
+ c1.expects(:on_request).with("exit-status").yields(c1)
+ c2.expects(:on_request).with("exit-status").yields(c2)
+ channel = Net::SSH::Multi::Channel.new(mock('session'), [c1, c2])
+ assert_equal channel, channel.on_request("exit-status") { |c| results << c }
+ assert_equal [c1, c2], results
+ end
+
+ private
+
+ class MockSession
+ def loop
+ while true do
+ return if !yield(self)
+ end
+ end
+ end
+end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/test/common.rb b/pkg/net-ssh-multi-1.1/test/common.rb
new file mode 100644
index 0000000..dd4f074
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/test/common.rb
@@ -0,0 +1,2 @@
+require 'test/unit'
+require 'mocha' \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/test/multi_test.rb b/pkg/net-ssh-multi-1.1/test/multi_test.rb
new file mode 100644
index 0000000..0a5d5bb
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/test/multi_test.rb
@@ -0,0 +1,20 @@
+require 'common'
+require 'net/ssh/multi'
+
+class MultiTest < Test::Unit::TestCase
+ def test_start_with_block_should_yield_session_and_then_close
+ Net::SSH::Multi::Session.any_instance.expects(:loop)
+ Net::SSH::Multi::Session.any_instance.expects(:close)
+ yielded = false
+ Net::SSH::Multi.start do |session|
+ yielded = true
+ assert_instance_of Net::SSH::Multi::Session, session
+ end
+ end
+
+ def test_start_without_block_should_return_open_session
+ Net::SSH::Multi::Session.any_instance.expects(:loop).never
+ Net::SSH::Multi::Session.any_instance.expects(:close).never
+ assert_instance_of Net::SSH::Multi::Session, Net::SSH::Multi.start
+ end
+end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/test/server_test.rb b/pkg/net-ssh-multi-1.1/test/server_test.rb
new file mode 100644
index 0000000..4c0c640
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/test/server_test.rb
@@ -0,0 +1,256 @@
+require 'common'
+require 'net/ssh/multi/server'
+
+class ServerTest < Test::Unit::TestCase
+ def setup
+ @master = stub('multi-session', :default_user => "bob")
+ end
+
+ def test_accessor_without_properties_should_access_empty_hash
+ assert_nil server('host')[:foo]
+ end
+
+ def test_accessor_with_properties_should_access_properties
+ assert_equal "hello", server('host', :properties => { :foo => "hello" })[:foo]
+ end
+
+ def test_port_should_return_22_by_default
+ assert_equal 22, server('host').port
+ end
+
+ def test_port_should_return_given_port_when_present
+ assert_equal 1234, server('host', :port => 1234).port
+ end
+
+ def test_port_should_return_parsed_port_when_present
+ assert_equal 1234, server('host:1234', :port => 1235).port
+ end
+
+ def test_user_should_return_default_user_by_default
+ assert_equal "bob", server('host').user
+ end
+
+ def test_user_should_return_given_user_when_present
+ assert_equal "jim", server('host', :user => "jim").user
+ end
+
+ def test_user_should_return_parsed_user_when_present
+ assert_equal "jim", server('jim@host', :user => "john").user
+ end
+
+ def test_equivalence_when_host_and_user_and_port_match
+ s1 = server('user@host:1234')
+ s2 = server('user@host:1234')
+ assert s1.eql?(s2)
+ assert_equal s1.hash, s2.hash
+ assert s1 == s2
+ end
+
+ def test_equivalence_when_host_mismatch
+ s1 = server('user@host1:1234')
+ s2 = server('user@host2:1234')
+ assert !s1.eql?(s2)
+ assert_not_equal s1.hash, s2.hash
+ assert s1 != s2
+ end
+
+ def test_equivalence_when_port_mismatch
+ s1 = server('user@host:1234')
+ s2 = server('user@host:1235')
+ assert !s1.eql?(s2)
+ assert_not_equal s1.hash, s2.hash
+ assert s1 != s2
+ end
+
+ def test_equivalence_when_user_mismatch
+ s1 = server('user1@host:1234')
+ s2 = server('user2@host:1234')
+ assert !s1.eql?(s2)
+ assert_not_equal s1.hash, s2.hash
+ assert s1 != s2
+ end
+
+ def test_to_s_should_include_user_and_host
+ assert_equal "user@host", server('user@host').to_s
+ end
+
+ def test_to_s_should_include_user_and_host_and_port_when_port_is_given
+ assert_equal "user@host:1234", server('user@host:1234').to_s
+ end
+
+ def test_gateway_should_be_nil_by_default
+ assert_nil server('host').gateway
+ end
+
+ def test_gateway_should_be_set_with_the_via_value
+ gateway = mock('gateway')
+ assert_equal gateway, server('host', :via => gateway).gateway
+ end
+
+ def test_session_with_default_argument_should_not_instantiate_session
+ assert_nil server('host').session
+ end
+
+ def test_session_with_true_argument_should_instantiate_and_cache_session
+ srv = server('host')
+ session = expect_connection_to(srv)
+ assert_equal session, srv.session(true)
+ assert_equal session, srv.session(true)
+ assert_equal session, srv.session
+ end
+
+ def test_session_that_cannot_authenticate_adds_host_to_exception_message
+ srv = server('host')
+ Net::SSH.expects(:start).with('host', 'bob', {}).raises(Net::SSH::AuthenticationFailed.new('bob'))
+
+ begin
+ srv.new_session
+ flunk
+ rescue Net::SSH::AuthenticationFailed => e
+ assert_equal "bob@host", e.message
+ end
+ end
+
+ def test_close_channels_when_session_is_not_open_should_not_do_anything
+ assert_nothing_raised { server('host').close_channels }
+ end
+
+ def test_close_channels_when_session_is_open_should_iterate_over_open_channels_and_close_them
+ srv = server('host')
+ session = expect_connection_to(srv)
+ c1 = mock('channel', :close => nil)
+ c2 = mock('channel', :close => nil)
+ c3 = mock('channel', :close => nil)
+ session.expects(:channels).returns(1 => c1, 2 => c2, 3 => c3)
+ assert_equal session, srv.session(true)
+ srv.close_channels
+ end
+
+ def test_close_when_session_is_not_open_should_not_do_anything
+ assert_nothing_raised { server('host').close }
+ end
+
+ def test_close_when_session_is_open_should_close_session
+ srv = server('host')
+ session = expect_connection_to(srv)
+ session.expects(:close)
+ @master.expects(:server_closed).with(srv)
+ assert_equal session, srv.session(true)
+ srv.close
+ end
+
+ def test_busy_should_be_false_when_session_is_not_open
+ assert !server('host').busy?
+ end
+
+ def test_busy_should_be_false_when_session_is_not_busy
+ srv = server('host')
+ session = expect_connection_to(srv)
+ session.expects(:busy?).returns(false)
+ srv.session(true)
+ assert !srv.busy?
+ end
+
+ def test_busy_should_be_true_when_session_is_busy
+ srv = server('host')
+ session = expect_connection_to(srv)
+ session.expects(:busy?).returns(true)
+ srv.session(true)
+ assert srv.busy?
+ end
+
+ def test_preprocess_should_be_nil_when_session_is_not_open
+ assert_nil server('host').preprocess
+ end
+
+ def test_preprocess_should_return_result_of_session_preprocess
+ srv = server('host')
+ session = expect_connection_to(srv)
+ session.expects(:preprocess).returns(:result)
+ srv.session(true)
+ assert_equal :result, srv.preprocess
+ end
+
+ def test_readers_should_return_empty_array_when_session_is_not_open
+ assert_equal [], server('host').readers
+ end
+
+ def test_readers_should_return_all_listeners_when_session_is_open
+ srv = server('host')
+ session = expect_connection_to(srv)
+ io1, io2, io3, io4 = Reader.new, Reader.new, Reader.new, Reader.new
+ session.expects(:listeners).returns(io1 => 2, io2 => 4, io3 => 6, io4 => 8)
+ srv.session(true)
+ assert_equal [io1, io2, io3, io4], srv.readers.sort
+ end
+
+ def test_writers_should_return_empty_array_when_session_is_not_open
+ assert_equal [], server('host').writers
+ end
+
+ def test_writers_should_return_all_listeners_that_are_pending_writes_when_session_is_open
+ srv = server('host')
+ session = expect_connection_to(srv)
+ listeners = { Reader.new(true) => 1, MockIO.new => 2,
+ MockIO.new => 3, Reader.new => 4, Reader.new(true) => 5 }
+ session.expects(:listeners).returns(listeners)
+ srv.session(true)
+ assert_equal 2, srv.writers.length
+ end
+
+ def test_postprocess_should_return_true_when_session_is_not_open
+ assert_equal true, server('host').postprocess([], [])
+ end
+
+ def test_postprocess_should_call_session_postprocess_with_ios_belonging_to_session
+ srv = server('host')
+ session = expect_connection_to(srv)
+ session.expects(:listeners).returns(1 => 2, 3 => 4, 5 => 6, 7 => 8)
+ session.expects(:postprocess).with([1,3], [7]).returns(:result)
+ srv.session(true)
+ assert_equal :result, srv.postprocess([1,11,3], [18,14,7,12])
+ end
+
+ private
+
+ class MockIO
+ include Comparable
+
+ @@identifier = 0
+
+ attr_reader :id
+
+ def initialize
+ @id = (@@identifier += 1)
+ end
+
+ def <=>(io)
+ @id <=> io.id
+ end
+
+ def closed?
+ false
+ end
+ end
+
+ class Reader < MockIO
+ def initialize(ready=false)
+ super()
+ @ready = ready
+ end
+
+ def pending_write?
+ @ready
+ end
+ end
+
+ def server(host, options={})
+ Net::SSH::Multi::Server.new(@master, host, options)
+ end
+
+ def expect_connection_to(server)
+ session = {}
+ @master.expects(:next_session).with(server).returns(session)
+ return session
+ end
+end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/test/session_actions_test.rb b/pkg/net-ssh-multi-1.1/test/session_actions_test.rb
new file mode 100644
index 0000000..6c688af
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/test/session_actions_test.rb
@@ -0,0 +1,128 @@
+require 'common'
+require 'net/ssh/multi/server'
+require 'net/ssh/multi/session_actions'
+
+class SessionActionsTest < Test::Unit::TestCase
+ class SessionActionsContainer
+ include Net::SSH::Multi::SessionActions
+
+ attr_reader :servers
+
+ def initialize
+ @servers = []
+ end
+
+ def default_user
+ "user"
+ end
+
+ def use(h, o={})
+ server = Net::SSH::Multi::Server.new(self, h, o)
+ servers << server
+ server
+ end
+ end
+
+ def setup
+ @session = SessionActionsContainer.new
+ end
+
+ def test_busy_should_be_true_if_any_server_is_busy
+ srv1, srv2, srv3 = @session.use('h1'), @session.use('h2'), @session.use('h3')
+ srv1.stubs(:busy?).returns(false)
+ srv2.stubs(:busy?).returns(false)
+ srv3.stubs(:busy?).returns(true)
+ assert @session.busy?
+ end
+
+ def test_busy_should_be_false_if_all_servers_are_not_busy
+ srv1, srv2, srv3 = @session.use('h1'), @session.use('h2'), @session.use('h3')
+ srv1.stubs(:busy?).returns(false)
+ srv2.stubs(:busy?).returns(false)
+ srv3.stubs(:busy?).returns(false)
+ assert !@session.busy?
+ end
+
+ def test_send_global_request_should_delegate_to_sessions
+ s1 = mock('ssh')
+ s2 = mock('ssh')
+ s1.expects(:send_global_request).with("a", "b", "c").yields
+ s2.expects(:send_global_request).with("a", "b", "c").yields
+ @session.expects(:sessions).returns([s1, s2])
+ calls = 0
+ @session.send_global_request("a", "b", "c") { calls += 1 }
+ assert_equal 2, calls
+ end
+
+ def test_open_channel_should_delegate_to_sessions_and_set_accessors_on_each_channel_and_return_multi_channel
+ srv1 = @session.use('h1')
+ srv2 = @session.use('h2')
+ s1 = { :server => srv1 }
+ s2 = { :server => srv2 }
+ c1 = { :stub => :value }
+ c2 = {}
+ c1.stubs(:connection).returns(s1)
+ c2.stubs(:connection).returns(s2)
+ @session.expects(:sessions).returns([s1, s2])
+ s1.expects(:open_channel).with("session").yields(c1).returns(c1)
+ s2.expects(:open_channel).with("session").yields(c2).returns(c2)
+ results = []
+ channel = @session.open_channel do |c|
+ results << c
+ end
+ assert_equal [c1, c2], results
+ assert_equal "h1", c1[:host]
+ assert_equal "h2", c2[:host]
+ assert_equal srv1, c1[:server]
+ assert_equal srv2, c2[:server]
+ assert_instance_of Net::SSH::Multi::Channel, channel
+ assert_equal [c1, c2], channel.channels
+ end
+
+ def test_exec_should_raise_exception_if_channel_cannot_exec_command
+ c = { :host => "host" }
+ @session.expects(:open_channel).yields(c).returns(c)
+ c.expects(:exec).with('something').yields(c, false)
+ assert_raises(RuntimeError) { @session.exec("something") }
+ end
+
+ def test_exec_with_block_should_pass_data_and_extended_data_to_block
+ c = { :host => "host" }
+ @session.expects(:open_channel).yields(c).returns(c)
+ c.expects(:exec).with('something').yields(c, true)
+ c.expects(:on_data).yields(c, "stdout")
+ c.expects(:on_extended_data).yields(c, 1, "stderr")
+ c.expects(:on_request)
+ results = {}
+ @session.exec("something") do |c, stream, data|
+ results[stream] = data
+ end
+ assert_equal({:stdout => "stdout", :stderr => "stderr"}, results)
+ end
+
+ def test_exec_without_block_should_write_data_and_extended_data_lines_to_stdout_and_stderr
+ c = { :host => "host" }
+ @session.expects(:open_channel).yields(c).returns(c)
+ c.expects(:exec).with('something').yields(c, true)
+ c.expects(:on_data).yields(c, "stdout 1\nstdout 2\n")
+ c.expects(:on_extended_data).yields(c, 1, "stderr 1\nstderr 2\n")
+ c.expects(:on_request)
+ $stdout.expects(:puts).with("[host] stdout 1\n")
+ $stdout.expects(:puts).with("[host] stdout 2")
+ $stderr.expects(:puts).with("[host] stderr 1\n")
+ $stderr.expects(:puts).with("[host] stderr 2")
+ @session.exec("something")
+ end
+
+ def test_exec_should_capture_exit_status_of_process
+ c = { :host => "host" }
+ @session.expects(:open_channel).yields(c).returns(c)
+ c.expects(:exec).with('something').yields(c, true)
+ c.expects(:on_data)
+ c.expects(:on_extended_data)
+ c.expects(:on_request).with("exit-status").yields(c, Net::SSH::Buffer.from(:long, 127))
+ @session.exec("something")
+ assert_equal 127, c[:exit_status]
+ end
+
+end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/test/session_test.rb b/pkg/net-ssh-multi-1.1/test/session_test.rb
new file mode 100644
index 0000000..c453a97
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/test/session_test.rb
@@ -0,0 +1,201 @@
+require 'common'
+require 'net/ssh/multi/session'
+
+class SessionTest < Test::Unit::TestCase
+ def setup
+ @session = Net::SSH::Multi::Session.new
+ end
+
+ def test_group_should_fail_when_given_both_mapping_and_block
+ assert_raises(ArgumentError) do
+ @session.group(:app => mock('server')) { |s| }
+ end
+ end
+
+ def test_group_with_block_should_use_groups_within_block_and_restore_on_exit
+ @session.open_groups.concat([:first, :second])
+ assert_equal [:first, :second], @session.open_groups
+ yielded = nil
+ @session.group(:third, :fourth) do |s|
+ yielded = s
+ assert_equal [:first, :second, :third, :fourth], @session.open_groups
+ end
+ assert_equal [:first, :second], @session.open_groups
+ assert_equal @session, yielded
+ end
+
+ def test_group_with_mapping_should_append_new_servers_to_specified_and_open_groups
+ s1, s2, s3, s4 = @session.use('h1', 'h2', 'h3', 'h4')
+ @session.group :second => s1
+ @session.open_groups.concat([:first, :second])
+ @session.group %w(third fourth) => [s2, s3], :fifth => s1, :sixth => [s4]
+ assert_equal [s1, s2, s3, s4], @session.groups[:first].sort
+ assert_equal [s1, s2, s3, s4], @session.groups[:second].sort
+ assert_equal [s2, s3], @session.groups[:third].sort
+ assert_equal [s2, s3], @session.groups[:fourth].sort
+ assert_equal [s1], @session.groups[:fifth].sort
+ assert_equal [s4], @session.groups[:sixth].sort
+ end
+
+ def test_via_should_instantiate_and_set_default_gateway
+ Net::SSH::Gateway.expects(:new).with('host', 'user', :a => :b).returns(:gateway)
+ assert_equal @session, @session.via('host', 'user', :a => :b)
+ assert_equal :gateway, @session.default_gateway
+ end
+
+ def test_use_should_add_new_server_to_server_list
+ @session.open_groups.concat([:first, :second])
+ server = @session.use('user@host', :a => :b)
+ assert_equal [server], @session.servers
+ assert_equal 'host', server.host
+ assert_equal 'user', server.user
+ assert_equal({:a => :b}, server.options)
+ assert_nil server.gateway
+ end
+
+ def test_use_with_open_groups_should_add_new_server_to_server_list_and_groups
+ @session.open_groups.concat([:first, :second])
+ server = @session.use('host')
+ assert_equal [server], @session.groups[:first].sort
+ assert_equal [server], @session.groups[:second].sort
+ end
+
+ def test_use_with_default_gateway_should_set_gateway_on_server
+ Net::SSH::Gateway.expects(:new).with('host', 'user', {}).returns(:gateway)
+ @session.via('host', 'user')
+ server = @session.use('host2')
+ assert_equal :gateway, server.gateway
+ end
+
+ def test_use_with_duplicate_server_will_not_add_server_twice
+ s1, s2 = @session.use('host', 'host')
+ assert_equal 1, @session.servers.length
+ assert_equal s1.object_id, s2.object_id
+ end
+
+ def test_with_should_yield_new_subsession_with_servers_for_criteria
+ yielded = nil
+ @session.expects(:servers_for).with(:app, :web).returns([:servers])
+ result = @session.with(:app, :web) do |s|
+ yielded = s
+ end
+ assert_equal result, yielded
+ assert_equal [:servers], yielded.servers
+ end
+
+ def test_servers_for_with_unknown_constraint_should_raise_error
+ assert_raises(ArgumentError) do
+ @session.servers_for(:app => { :all => :foo })
+ end
+ end
+
+ def test_with_with_constraints_should_build_subsession_with_matching_servers
+ conditions = { :app => { :only => { :primary => true }, :except => { :backup => true } } }
+ @session.expects(:servers_for).with(conditions).returns([:servers])
+ assert_equal [:servers], @session.with(conditions).servers
+ end
+
+ def test_on_should_return_subsession_containing_only_the_given_servers
+ s1, s2 = @session.use('h1', 'h2')
+ subsession = @session.on(s1, s2)
+ assert_equal [s1, s2], subsession.servers
+ end
+
+ def test_on_should_yield_subsession_if_block_is_given
+ s1 = @session.use('h1')
+ yielded = nil
+ result = @session.on(s1) do |s|
+ yielded = s
+ assert_equal [s1], s.servers
+ end
+ assert_equal result, yielded
+ end
+
+ def test_servers_for_should_return_all_servers_if_no_arguments
+ srv1, srv2, srv3 = @session.use('h1', 'h2', 'h3')
+ assert_equal [srv1, srv2, srv3], @session.servers_for.sort
+ end
+
+ def test_servers_for_should_return_servers_only_for_given_group
+ srv1, srv2, srv3 = @session.use('h1', 'h2', 'h3')
+ @session.group :app => [srv1, srv2], :db => [srv3]
+ assert_equal [srv1, srv2], @session.servers_for(:app).sort
+ end
+
+ def test_servers_for_should_not_return_duplicate_servers
+ srv1, srv2, srv3 = @session.use('h1', 'h2', 'h3')
+ @session.group :app => [srv1, srv2], :db => [srv2, srv3]
+ assert_equal [srv1, srv2, srv3], @session.servers_for(:app, :db).sort
+ end
+
+ def test_servers_for_should_correctly_apply_only_and_except_constraints
+ srv1, srv2, srv3 = @session.use('h1', :properties => {:a => 1}), @session.use('h2', :properties => {:a => 1, :b => 2}), @session.use('h3')
+ @session.group :app => [srv1, srv2, srv3]
+ assert_equal [srv1], @session.servers_for(:app => {:only => {:a => 1}, :except => {:b => 2}})
+ end
+
+ def test_close_should_close_server_sessions
+ srv1, srv2 = @session.use('h1', 'h2')
+ srv1.expects(:close_channels)
+ srv2.expects(:close_channels)
+ srv1.expects(:close)
+ srv2.expects(:close)
+ @session.close
+ end
+
+ def test_close_should_shutdown_default_gateway
+ gateway = mock('gateway')
+ gateway.expects(:shutdown!)
+ Net::SSH::Gateway.expects(:new).returns(gateway)
+ @session.via('host', 'user')
+ @session.close
+ end
+
+ def test_loop_should_loop_until_process_is_false
+ @session.expects(:process).with(5).times(4).returns(true,true,true,false).yields
+ yielded = false
+ @session.loop(5) { yielded = true }
+ assert yielded
+ end
+
+ def test_preprocess_should_immediately_return_false_if_block_returns_false
+ srv = @session.use('h1')
+ srv.expects(:preprocess).never
+ assert_equal false, @session.preprocess { false }
+ end
+
+ def test_preprocess_should_call_preprocess_on_component_servers
+ srv = @session.use('h1')
+ srv.expects(:preprocess)
+ assert_equal :hello, @session.preprocess { :hello }
+ end
+
+ def test_preprocess_should_succeed_even_without_block
+ srv = @session.use('h1')
+ srv.expects(:preprocess)
+ assert_equal true, @session.preprocess
+ end
+
+ def test_postprocess_should_call_postprocess_on_component_servers
+ srv = @session.use('h1')
+ srv.expects(:postprocess).with([:a], [:b])
+ assert_equal true, @session.postprocess([:a], [:b])
+ end
+
+ def test_process_should_return_false_if_preprocess_returns_false
+ assert_equal false, @session.process { false }
+ end
+
+ def test_process_should_call_select_on_combined_readers_and_writers_from_all_servers
+ @session.expects(:postprocess).with([:b, :c], [:a, :c])
+ srv1, srv2, srv3 = @session.use('h1', 'h2', 'h3')
+ srv1.expects(:readers).returns([:a])
+ srv1.expects(:writers).returns([:a])
+ srv2.expects(:readers).returns([])
+ srv2.expects(:writers).returns([])
+ srv3.expects(:readers).returns([:b, :c])
+ srv3.expects(:writers).returns([:c])
+ IO.expects(:select).with([:a, :b, :c], [:a, :c], nil, 5).returns([[:b, :c], [:a, :c]])
+ @session.process(5)
+ end
+end \ No newline at end of file
diff --git a/pkg/net-ssh-multi-1.1/test/test_all.rb b/pkg/net-ssh-multi-1.1/test/test_all.rb
new file mode 100644
index 0000000..cd10079
--- /dev/null
+++ b/pkg/net-ssh-multi-1.1/test/test_all.rb
@@ -0,0 +1,5 @@
+# $ ruby -Ilib -Itest -rrubygems test/test_all.rb
+# $ ruby -Ilib -Itest -rrubygems test/channel_test.rb
+Dir["#{File.dirname(__FILE__)}/**/*_test.rb"].each do |file|
+ load(file)
+end \ No newline at end of file