doc/classes/Breakpoint/CommandBundle.html in ruby-breakpoint-0.5.0 vs doc/classes/Breakpoint/CommandBundle.html in ruby-breakpoint-0.5.1

- old
+ new

@@ -1,207 +1,207 @@ -<?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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <title>Module: Breakpoint::CommandBundle</title> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> - <meta http-equiv="Content-Script-Type" content="text/javascript" /> - <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> - <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 ) { - if ( document.getElementById ) - elem = document.getElementById( id ); - else if ( document.all ) - elem = eval( "document.all." + id ); - else - return false; - - elemStyle = elem.style; - - if ( elemStyle.display != "block" ) { - elemStyle.display = "block" - } else { - elemStyle.display = "none" - } - - return true; - } - - // Make codeblocks hidden by default - document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) - - // ]]> - </script> - -</head> -<body> - - - - <div id="classHeader"> - <table class="header-table"> - <tr class="top-aligned-row"> - <td><strong>Module</strong></td> - <td class="class-name-in-header">Breakpoint::CommandBundle</td> - </tr> - <tr class="top-aligned-row"> - <td><strong>In:</strong></td> - <td> - <a href="../../files/lib/breakpoint_rb.html"> - lib/breakpoint.rb - </a> - <br /> - </td> - </tr> - - </table> - </div> - <!-- banner header --> - - <div id="bodyContent"> - - - - <div id="contextContent"> - - <div id="description"> - <p> -These commands are automatically available in all breakpoint shells. -</p> - - </div> - - - </div> - - <div id="method-list"> - <h3 class="section-bar">Methods</h3> - - <div class="name-list"> - <a href="#M000010">client</a>&nbsp;&nbsp; - <a href="#M000009">source_lines</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="CommandBundle/Client.html" class="link">Breakpoint::CommandBundle::Client</a><br /> - - </div> - - - - - - - - <!-- if method_list --> - <div id="methods"> - <h3 class="section-bar">Public Instance methods</h3> - - <div id="method-M000010" class="method-detail"> - <a name="M000010"></a> - - <div class="method-heading"> - <a href="#M000010" class="method-signature"> - <span class="method-name">client</span><span class="method-args">()</span> - </a> - </div> - - <div class="method-description"> - <p> -Lets an object that will forward method calls to the breakpoint client. -This is useful for outputting longer things at the client and so on. You -can for example do these things: -</p> -<pre> - client.puts &quot;Hello&quot; # outputs &quot;Hello&quot; at client console - # outputs &quot;Hello&quot; into the file temp.txt at the client - client.File.open(&quot;temp.txt&quot;, &quot;w&quot;) { |f| f.puts &quot;Hello&quot; } -</pre> - <p><a class="source-toggle" href="#" - onclick="toggleCode('M000010-source');return false;">[Source]</a></p> - <div class="method-source-code" id="M000010-source"> -<pre> - <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 196</span> -196: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client</span>() -197: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Breakpoint</span>.<span class="ruby-identifier">use_drb?</span> <span class="ruby-keyword kw">then</span> -198: <span class="ruby-identifier">sleep</span>(<span class="ruby-value">0</span><span class="ruby-value">.5</span>) <span class="ruby-keyword kw">until</span> <span class="ruby-constant">Breakpoint</span>.<span class="ruby-identifier">drb_service</span>.<span class="ruby-identifier">eval_handler</span> -199: <span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Breakpoint</span>.<span class="ruby-identifier">drb_service</span>.<span class="ruby-identifier">eval_handler</span>) -200: <span class="ruby-keyword kw">else</span> -201: <span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">code</span><span class="ruby-operator">|</span> <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">code</span>, <span class="ruby-constant">TOPLEVEL_BINDING</span>) }) -202: <span class="ruby-keyword kw">end</span> -203: <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">source_lines</span><span class="method-args">(context = 5, return_line_numbers = false)</span> - </a> - </div> - - <div class="method-description"> - <p> -Returns the source code surrounding the location where the breakpoint was -issued. -</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/breakpoint.rb, line 173</span> -173: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">source_lines</span>(<span class="ruby-identifier">context</span> = <span class="ruby-value">5</span>, <span class="ruby-identifier">return_line_numbers</span> = <span class="ruby-keyword kw">false</span>) -174: <span class="ruby-identifier">lines</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">readlines</span>(<span class="ruby-ivar">@__bp_file</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp</span> } -175: -176: <span class="ruby-identifier">break_line</span> = <span class="ruby-ivar">@__bp_line</span> -177: <span class="ruby-identifier">start_line</span> = [<span class="ruby-identifier">break_line</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">context</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">max</span> -178: <span class="ruby-identifier">end_line</span> = <span class="ruby-identifier">break_line</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">context</span> -179: -180: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">lines</span>[(<span class="ruby-identifier">start_line</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) <span class="ruby-operator">..</span> (<span class="ruby-identifier">end_line</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)] -181: -182: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">return_line_numbers</span> <span class="ruby-keyword kw">then</span> -183: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">start_line</span>, <span class="ruby-identifier">break_line</span>, <span class="ruby-identifier">result</span>] -184: <span class="ruby-keyword kw">else</span> -185: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span> -186: <span class="ruby-keyword kw">end</span> -187: <span class="ruby-keyword kw">end</span> -</pre> - </div> - </div> - </div> - - - </div> - - - </div> - - -<div id="validator-badges"> - <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> -</div> - -</body> +<?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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <title>Module: Breakpoint::CommandBundle</title> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> + <meta http-equiv="Content-Script-Type" content="text/javascript" /> + <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> + <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 ) { + if ( document.getElementById ) + elem = document.getElementById( id ); + else if ( document.all ) + elem = eval( "document.all." + id ); + else + return false; + + elemStyle = elem.style; + + if ( elemStyle.display != "block" ) { + elemStyle.display = "block" + } else { + elemStyle.display = "none" + } + + return true; + } + + // Make codeblocks hidden by default + document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) + + // ]]> + </script> + +</head> +<body> + + + + <div id="classHeader"> + <table class="header-table"> + <tr class="top-aligned-row"> + <td><strong>Module</strong></td> + <td class="class-name-in-header">Breakpoint::CommandBundle</td> + </tr> + <tr class="top-aligned-row"> + <td><strong>In:</strong></td> + <td> + <a href="../../files/lib/breakpoint_rb.html"> + lib/breakpoint.rb + </a> + <br /> + </td> + </tr> + + </table> + </div> + <!-- banner header --> + + <div id="bodyContent"> + + + + <div id="contextContent"> + + <div id="description"> + <p> +These commands are automatically available in all breakpoint shells. +</p> + + </div> + + + </div> + + <div id="method-list"> + <h3 class="section-bar">Methods</h3> + + <div class="name-list"> + <a href="#M000013">client</a>&nbsp;&nbsp; + <a href="#M000012">source_lines</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="CommandBundle/Client.html" class="link">Breakpoint::CommandBundle::Client</a><br /> + + </div> + + + + + + + + <!-- if method_list --> + <div id="methods"> + <h3 class="section-bar">Public Instance methods</h3> + + <div id="method-M000013" class="method-detail"> + <a name="M000013"></a> + + <div class="method-heading"> + <a href="#M000013" class="method-signature"> + <span class="method-name">client</span><span class="method-args">()</span> + </a> + </div> + + <div class="method-description"> + <p> +Lets an object that will forward method calls to the breakpoint client. +This is useful for outputting longer things at the client and so on. You +can for example do these things: +</p> +<pre> + client.puts &quot;Hello&quot; # outputs &quot;Hello&quot; at client console + # outputs &quot;Hello&quot; into the file temp.txt at the client + client.File.open(&quot;temp.txt&quot;, &quot;w&quot;) { |f| f.puts &quot;Hello&quot; } +</pre> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000013-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000013-source"> +<pre> + <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 216</span> +216: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client</span>() +217: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Breakpoint</span>.<span class="ruby-identifier">use_drb?</span> <span class="ruby-keyword kw">then</span> +218: <span class="ruby-identifier">sleep</span>(<span class="ruby-value">0</span><span class="ruby-value">.5</span>) <span class="ruby-keyword kw">until</span> <span class="ruby-constant">Breakpoint</span>.<span class="ruby-identifier">drb_service</span>.<span class="ruby-identifier">eval_handler</span> +219: <span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Breakpoint</span>.<span class="ruby-identifier">drb_service</span>.<span class="ruby-identifier">eval_handler</span>) +220: <span class="ruby-keyword kw">else</span> +221: <span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">code</span><span class="ruby-operator">|</span> <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">code</span>, <span class="ruby-constant">TOPLEVEL_BINDING</span>) }) +222: <span class="ruby-keyword kw">end</span> +223: <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + <div id="method-M000012" class="method-detail"> + <a name="M000012"></a> + + <div class="method-heading"> + <a href="#M000012" class="method-signature"> + <span class="method-name">source_lines</span><span class="method-args">(context = 5, return_line_numbers = false)</span> + </a> + </div> + + <div class="method-description"> + <p> +Returns the source code surrounding the location where the breakpoint was +issued. +</p> + <p><a class="source-toggle" href="#" + onclick="toggleCode('M000012-source');return false;">[Source]</a></p> + <div class="method-source-code" id="M000012-source"> +<pre> + <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 193</span> +193: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">source_lines</span>(<span class="ruby-identifier">context</span> = <span class="ruby-value">5</span>, <span class="ruby-identifier">return_line_numbers</span> = <span class="ruby-keyword kw">false</span>) +194: <span class="ruby-identifier">lines</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">readlines</span>(<span class="ruby-ivar">@__bp_file</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span> <span class="ruby-identifier">line</span>.<span class="ruby-identifier">chomp</span> } +195: +196: <span class="ruby-identifier">break_line</span> = <span class="ruby-ivar">@__bp_line</span> +197: <span class="ruby-identifier">start_line</span> = [<span class="ruby-identifier">break_line</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">context</span>, <span class="ruby-value">1</span>].<span class="ruby-identifier">max</span> +198: <span class="ruby-identifier">end_line</span> = <span class="ruby-identifier">break_line</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">context</span> +199: +200: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">lines</span>[(<span class="ruby-identifier">start_line</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>) <span class="ruby-operator">..</span> (<span class="ruby-identifier">end_line</span> <span class="ruby-operator">-</span> <span class="ruby-value">1</span>)] +201: +202: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">return_line_numbers</span> <span class="ruby-keyword kw">then</span> +203: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">start_line</span>, <span class="ruby-identifier">break_line</span>, <span class="ruby-identifier">result</span>] +204: <span class="ruby-keyword kw">else</span> +205: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span> +206: <span class="ruby-keyword kw">end</span> +207: <span class="ruby-keyword kw">end</span> +</pre> + </div> + </div> + </div> + + + </div> + + + </div> + + +<div id="validator-badges"> + <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> +</div> + +</body> </html> \ No newline at end of file