<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Module: TSort</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" /> <script language="JavaScript" type="text/javascript"> // <![CDATA[ function toggleSource( id ) { var elem var link if( document.getElementById ) { elem = document.getElementById( id ) link = document.getElementById( "l_" + id ) } else if ( document.all ) { elem = eval( "document.all." + id ) link = eval( "document.all.l_" + id ) } else return false; if( elem.style.display == "block" ) { elem.style.display = "none" link.innerHTML = "show source" } else { elem.style.display = "block" link.innerHTML = "hide source" } } function openCode( url ) { window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" ) } // ]]> </script> </head> <body> <table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr> <td class="file-title"><span class="file-title-prefix">Module</span><br />TSort</td> <td align="right"> <table cellspacing=0 cellpadding=2> <tr valign="top"> <td>In:</td> <td> <a href="../files/lib/facets/more/taskable_rb.html">lib/facets/more/taskable.rb</a> </td> </tr> </table> </td> </tr> </table> <!-- banner header --> <div id="bodyContent"> <div id="content"> <div class="description"><h1><a href="TSort.html">TSort</a></h1> <p> <a href="TSort.html">TSort</a> is used to determine which prerequisites to run for a task. </p> <p> Here we add a convenience method —if such a long method name can be said to be convenient ;) Although we ended not using it after all —it still may proved useful and may eventually be added to Facets or submitted as a patch. </p> </div> <div class="sectiontitle">Methods</div> <ul> <li><a href="#M000843">strongly_connected_components_from</a></li> </ul> <div class="sectiontitle">Public Instance methods</div> <div class="method"> <div class="title"> <a name="M000843"></a><b>strongly_connected_components_from</b>(node) </div> <div class="sourcecode"> <p class="source-link">[ <a href="javascript:toggleSource('M000843_source')" id="l_M000843_source">show source</a> ]</p> <div id="M000843_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File lib/facets/more/taskable.rb, line 38</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">strongly_connected_components_from</span>(<span class="ruby-identifier">node</span>) <span class="ruby-identifier">result</span> = [] <span class="ruby-identifier">each_strongly_connected_component_from</span>(<span class="ruby-identifier">node</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">component</span><span class="ruby-operator">|</span> <span class="ruby-identifier">result</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">component</span> <span class="ruby-keyword kw">end</span> <span class="ruby-identifier">result</span> <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> </div> </div> </body> </html>