doc/classes/Symbol.html in prelude-0.0.2 vs doc/classes/Symbol.html in prelude-0.0.3
- old
+ new
@@ -84,11 +84,13 @@
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
- <a href="#M000002">curry</a>
+ <a href="#M000004">**</a>
+ <a href="#M000002">-@</a>
+ <a href="#M000003">curry</a>
<a href="#M000001">to_proc</a>
</div>
</div>
</div>
@@ -107,28 +109,76 @@
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
+ <div id="method-M000004" class="method-detail">
+ <a name="M000004"></a>
+
+ <div class="method-heading">
+ <a href="#M000004" class="method-signature">
+ <span class="method-name">**</span><span class="method-args">(*args)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+This is will serve as an infix composition operator for symbols. If between
+two symbols, returns composition proc, executes left symbol otherwise.
+</p>
+ <p><a class="source-toggle" href="#"
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000004-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/prelude.rb, line 77</span>
+77: <span class="ruby-keyword kw">def</span> <span class="ruby-operator">**</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
+78: <span class="ruby-keyword kw">if</span> (<span class="ruby-value">1</span><span class="ruby-operator">==</span><span class="ruby-identifier">args</span>.<span class="ruby-identifier">length</span>) <span class="ruby-operator">&&</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Symbol</span>)
+79: <span class="ruby-identifier">proc</span> {<span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">a</span>)) }
+80: <span class="ruby-keyword kw">else</span>
+81: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>.<span class="ruby-identifier">flatten</span>)
+82: <span class="ruby-keyword kw">end</span>
+83: <span class="ruby-keyword kw">end</span>
+</pre>
+ </div>
+ </div>
+ </div>
+
<div id="method-M000002" class="method-detail">
<a name="M000002"></a>
<div class="method-heading">
- <a href="#M000002" class="method-signature">
+ <span class="method-name">-@</span><span class="method-args">()</span>
+ </div>
+
+ <div class="method-description">
+ <p>
+Alias for <a href="Symbol.html#M000001">to_proc</a>
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000003" class="method-detail">
+ <a name="M000003"></a>
+
+ <div class="method-heading">
+ <a href="#M000003" class="method-signature">
<span class="method-name">curry</span><span class="method-args">(one, *args)</span>
</a>
</div>
<div class="method-description">
+ <p>
+FIXIT
+</p>
<p><a class="source-toggle" href="#"
- onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000002-source">
+ onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
+ <div class="method-source-code" id="M000003-source">
<pre>
- <span class="ruby-comment cmt"># File lib/prelude.rb, line 42</span>
-42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">curry</span>(<span class="ruby-identifier">one</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
-43: <span class="ruby-identifier">proc</span> { <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">one</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
-44: <span class="ruby-keyword kw">end</span>
+ <span class="ruby-comment cmt"># File lib/prelude.rb, line 71</span>
+71: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">curry</span>(<span class="ruby-identifier">one</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
+72: <span class="ruby-identifier">proc</span> { <span class="ruby-operator">|</span><span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_proc</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">one</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
+73: <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
@@ -140,17 +190,20 @@
<span class="method-name">to_proc</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
+ <p>
+Converts a symbol to a proc object
+</p>
<p><a class="source-toggle" href="#"
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
<div class="method-source-code" id="M000001-source">
<pre>
- <span class="ruby-comment cmt"># File lib/prelude.rb, line 38</span>
-38: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc</span>
-39: <span class="ruby-identifier">proc</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
-40: <span class="ruby-keyword kw">end</span>
+ <span class="ruby-comment cmt"># File lib/prelude.rb, line 63</span>
+63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_proc</span>
+64: <span class="ruby-identifier">proc</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span><span class="ruby-operator">|</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
+65: <span class="ruby-keyword kw">end</span>
</pre>
</div>
</div>
</div>
\ No newline at end of file