doc/EZMQ/Server.html in ezmq-0.1.2 vs doc/EZMQ/Server.html in ezmq-0.2.0
- old
+ new
@@ -114,46 +114,14 @@
</div>
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
- <ul class="summary">
-
- <li class="public ">
- <span class="summary_signature">
-
- <a href="#provides-instance_method" title="#provides (instance method)">- (Object) <strong>provides</strong> </a>
-
-
- </span>
-
-
-
-
-
-
-
-
-
-
+ <h2>Instance Attribute Summary</h2>
- <span class="summary_desc"><div class='inline'>
-<p>Returns the value of attribute provides.</p>
-</div></span>
-
-</li>
-
-
- </ul>
-
-
-
-
-
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Socket.html" title="EZMQ::Socket (class)">Socket</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Socket.html#context-instance_method" title="EZMQ::Socket#context (method)">#context</a></span>, <span class='object_link'><a href="Socket.html#decode-instance_method" title="EZMQ::Socket#decode (method)">#decode</a></span>, <span class='object_link'><a href="Socket.html#encode-instance_method" title="EZMQ::Socket#encode (method)">#encode</a></span>, <span class='object_link'><a href="Socket.html#socket-instance_method" title="EZMQ::Socket#socket (method)">#socket</a></span></p>
@@ -165,11 +133,11 @@
<ul class="summary">
<li class="public ">
<span class="summary_signature">
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Server) <strong>initialize</strong>(provides: -> m { m }, **options) </a>
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Server) <strong>initialize</strong>(**options) </a>
</span>
@@ -191,11 +159,11 @@
<li class="public ">
<span class="summary_signature">
- <a href="#listen-instance_method" title="#listen (instance method)">- (void) <strong>listen</strong>(handler: -> { send @provides.call(receive) }) </a>
+ <a href="#listen-instance_method" title="#listen (instance method)">- (void) <strong>listen</strong> {|message| ... }</a>
</span>
@@ -206,12 +174,11 @@
<span class="summary_desc"><div class='inline'>
-<p>By default, waits to receive a message, calls @action with it, replies with
-the result, then loops.</p>
+<p>Listens for a request, and responds to it.</p>
</div></span>
</li>
@@ -233,11 +200,11 @@
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
- - (<tt><span class='object_link'><a href="" title="EZMQ::Server (class)">Server</a></span></tt>) <strong>initialize</strong>(provides: -> m { m }, **options)
+ - (<tt><span class='object_link'><a href="" title="EZMQ::Server (class)">Server</a></span></tt>) <strong>initialize</strong>(**options)
@@ -253,26 +220,10 @@
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
- <span class='name'>provides</span>
-
-
- <span class='type'>(<tt>lambda</tt>)</span>
-
-
-
- —
- <div class='inline'>
-<p>the service provided by this server.</p>
-</div>
-
- </li>
-
- <li>
-
<span class='name'>options</span>
<span class='type'>(<tt>Hash</tt>)</span>
@@ -289,148 +240,147 @@
<p class="tag_title">See Also:</p>
<ul class="see">
- <li><span class='object_link'><a href="Socket.html" title="EZMQ::Socket (class)">EZMQ::Socket for a list of optional parameters.</a></span></li>
+ <li><span class='object_link'><a href="Socket.html" title="EZMQ::Socket (class)">EZMQ::Socket for optional parameters.</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
-98
-99
-100
-101</pre>
+152
+153
+154</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/ezmq.rb', line 98</span>
+ <pre class="code"><span class="info file"># File 'lib/ezmq.rb', line 152</span>
-<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>provides:</span> <span class='tlambda'>-></span> <span class='id identifier rubyid_m'>m</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_m'>m</span> <span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='ivar'>@provides</span> <span class='op'>=</span> <span class='id identifier rubyid_provides'>provides</span>
+<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
<span class='kw'>super</span> <span class='symbol'>:bind</span><span class='comma'>,</span> <span class='const'>ZMQ</span><span class='op'>::</span><span class='const'>REP</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
- <div id="instance_attr_details" class="attr_details">
- <h2>Instance Attribute Details</h2>
-
-
- <span id="provides=-instance_method"></span>
- <div class="method_details first">
- <h3 class="signature first" id="provides-instance_method">
-
- - (<tt>Object</tt>) <strong>provides</strong>
-
-
-
-
-</h3><div class="docstring">
- <div class="discussion">
-
-<p>Returns the value of attribute provides</p>
-
-
- </div>
-</div>
-<div class="tags">
-
-
-</div><table class="source_code">
- <tr>
- <td>
- <pre class="lines">
-
-
-87
-88
-89</pre>
- </td>
- <td>
- <pre class="code"><span class="info file"># File 'lib/ezmq.rb', line 87</span>
-
-<span class='kw'>def</span> <span class='id identifier rubyid_provides'>provides</span>
- <span class='ivar'>@provides</span>
-<span class='kw'>end</span></pre>
- </td>
- </tr>
-</table>
-</div>
-
- </div>
-
-
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="listen-instance_method">
- - (<tt>void</tt>) <strong>listen</strong>(handler: -> { send @provides.call(receive) })
+ - (<tt>void</tt>) <strong>listen</strong> {|message| ... }
</h3><div class="docstring">
<div class="discussion">
<p class="note returns_void">This method returns an undefined value.</p>
-<p>By default, waits to receive a message, calls @action with it, replies with
-the result, then loops.</p>
+<p>Listens for a request, and responds to it.</p>
+<p>If no block is given, responds with the request message.</p>
+
</div>
</div>
<div class="tags">
- <p class="tag_title">Parameters:</p>
-<ul class="param">
+<p class="tag_title">Yields:</p>
+<ul class="yield">
+
<li>
- <span class='name'>handler</span>
+ <span class='type'></span>
- <span class='type'>(<tt>lambda</tt>)</span>
+
+ <div class='inline'>
+<p>message passes the message received to the block.</p>
+</div>
+ </li>
+
+</ul>
+<p class="tag_title">Yield Parameters:</p>
+<ul class="yieldparam">
+
+ <li>
+
+ <span class='name'>message</span>
+
+
+ <span class='type'>(<tt>String</tt>)</span>
+
+
+
—
<div class='inline'>
-<p>how requests are handled.</p>
+<p>the message received.</p>
</div>
</li>
</ul>
+<p class="tag_title">Yield Returns:</p>
+<ul class="yieldreturn">
+
+ <li>
+
+
+ <span class='type'>(<tt>void</tt>)</span>
+
+
+
+ —
+ <div class='inline'>
+<p>the message to reply with.</p>
+</div>
+
+ </li>
+
+</ul>
-
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
-110
-111
-112</pre>
+166
+167
+168
+169
+170
+171
+172
+173
+174</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/ezmq.rb', line 110</span>
+ <pre class="code"><span class="info file"># File 'lib/ezmq.rb', line 166</span>
-<span class='kw'>def</span> <span class='id identifier rubyid_listen'>listen</span><span class='lparen'>(</span><span class='label'>handler:</span> <span class='tlambda'>-></span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_send'>send</span> <span class='ivar'>@provides</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_receive'>receive</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_loop'>loop</span> <span class='lbrace'>{</span> <span class='id identifier rubyid_handler'>handler</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span> <span class='rbrace'>}</span>
+<span class='kw'>def</span> <span class='id identifier rubyid_listen'>listen</span>
+ <span class='id identifier rubyid_loop'>loop</span> <span class='kw'>do</span>
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
+ <span class='id identifier rubyid_send'>send</span> <span class='kw'>yield</span> <span class='id identifier rubyid_receive'>receive</span>
+ <span class='kw'>else</span>
+ <span class='id identifier rubyid_send'>send</span> <span class='id identifier rubyid_receive'>receive</span>
+ <span class='kw'>end</span>
+ <span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -438,10 +388,10 @@
</div>
</div>
<div id="footer">
- Generated on Tue Jan 6 12:58:18 2015 by
+ Generated on Fri Jan 9 13:06:26 2015 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.0.0).
</div>
</body>
\ No newline at end of file