doc/classes/Prelude.html in prelude-0.0.2 vs doc/classes/Prelude.html in prelude-0.0.3

- old
+ new

@@ -86,23 +86,34 @@ </div> + <div id="method-list"> + <h3 class="section-bar">Methods</h3> + <div class="name-list"> + <a href="#M000007">empty_list_error</a>&nbsp;&nbsp; + <a href="#M000009">get_proc</a>&nbsp;&nbsp; + <a href="#M000008">missing_function_error</a>&nbsp;&nbsp; + </div> + </div> + </div> <!-- if includes --> <div id="section"> <div id="class-list"> <h3 class="section-bar">Classes and Modules</h3> - Class <a href="Prelude/List.html" class="link">Prelude::List</a><br /> -Class <a href="Prelude/Monad.html" class="link">Prelude::Monad</a><br /> + Module <a href="Prelude/List.html" class="link">Prelude::List</a><br /> +Module <a href="Prelude/Monad.html" class="link">Prelude::Monad</a><br /> +Class <a href="Prelude/EmptyListError.html" class="link">Prelude::EmptyListError</a><br /> +Class <a href="Prelude/MissingFunctionError.html" class="link">Prelude::MissingFunctionError</a><br /> Class <a href="Prelude/Tuple.html" class="link">Prelude::Tuple</a><br /> </div> <div id="constants-list"> @@ -111,21 +122,117 @@ <div class="name-list"> <table summary="Constants"> <tr class="top-aligned-row context-row"> <td class="context-item-name">VERSION</td> <td>=</td> - <td class="context-item-value">'0.0.2'</td> + <td class="context-item-value">'0.0.3'</td> </tr> + <tr class="top-aligned-row context-row"> + <td class="context-item-name">Id</td> + <td>=</td> + <td class="context-item-value">lambda { |x| x }</td> + <td width="3em">&nbsp;</td> + <td class="context-item-desc"> +Returns function that returns its argument + +</td> + </tr> </table> </div> </div> <!-- if method_list --> + <div id="methods"> + <h3 class="section-bar">Public Instance methods</h3> + + <div id="method-M000007" class="method-detail"> + <a name="M000007"></a> + + <div class="method-heading"> + <a href="#M000007" class="method-signature"> + <span class="method-name">empty_list_error</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p> +This is used to handle empty list errors in this library. Re-define to fit. +</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000007-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000007-source"> +<pre> + <span class="ruby-comment cmt"># File lib/prelude.rb, line 39</span> +39: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">empty_list_error</span> +40: <span class="ruby-identifier">raise</span> <span class="ruby-constant">EmptyListError</span>, <span class="ruby-value str">'Illegal operation on an empty list.'</span> +41: <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000009" class="method-detail"> + <a name="M000009"></a> + + <div class="method-heading"> + <a href="#M000009" class="method-signature"> + <span class="method-name">get_proc</span><span class="method-args">(f=nil, &amp;block)</span> + </a> + </div> + + <div class="method-description"> + <p> +A utility to determine if a function was passed +</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000009-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000009-source"> +<pre> + <span class="ruby-comment cmt"># File lib/prelude.rb, line 52</span> +52: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_proc</span>(<span class="ruby-identifier">f</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) +53: <span class="ruby-comment cmt"># Has to be either function 'f' or block</span> +54: <span class="ruby-identifier">f</span> = <span class="ruby-identifier">block_given?</span> <span class="ruby-value">? </span><span class="ruby-identifier">block</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">missing_function_error</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">nil?</span> +55: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">to_proc</span> +56: <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000008" class="method-detail"> + <a name="M000008"></a> + + <div class="method-heading"> + <a href="#M000008" class="method-signature"> + <span class="method-name">missing_function_error</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p> +This is used to handle missing function errors in this library. Re-define +to fit. +</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000008-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000008-source"> +<pre> + <span class="ruby-comment cmt"># File lib/prelude.rb, line 47</span> +47: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">missing_function_error</span> +48: <span class="ruby-identifier">raise</span> <span class="ruby-constant">MissingFunctionError</span>, <span class="ruby-value str">'No function or block supplied.'</span> +49: <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + + </div> </div> \ No newline at end of file