ruby-breakpoint 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,207 +1,207 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Module: Breakpoint::CommandBundle</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Module</strong></td>
53
- <td class="class-name-in-header">Breakpoint::CommandBundle</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../files/lib/breakpoint_rb.html">
59
- lib/breakpoint.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- </table>
66
- </div>
67
- <!-- banner header -->
68
-
69
- <div id="bodyContent">
70
-
71
-
72
-
73
- <div id="contextContent">
74
-
75
- <div id="description">
76
- <p>
77
- These commands are automatically available in all breakpoint shells.
78
- </p>
79
-
80
- </div>
81
-
82
-
83
- </div>
84
-
85
- <div id="method-list">
86
- <h3 class="section-bar">Methods</h3>
87
-
88
- <div class="name-list">
89
- <a href="#M000010">client</a>&nbsp;&nbsp;
90
- <a href="#M000009">source_lines</a>&nbsp;&nbsp;
91
- </div>
92
- </div>
93
-
94
- </div>
95
-
96
-
97
- <!-- if includes -->
98
-
99
- <div id="section">
100
-
101
- <div id="class-list">
102
- <h3 class="section-bar">Classes and Modules</h3>
103
-
104
- Class <a href="CommandBundle/Client.html" class="link">Breakpoint::CommandBundle::Client</a><br />
105
-
106
- </div>
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
- <!-- if method_list -->
115
- <div id="methods">
116
- <h3 class="section-bar">Public Instance methods</h3>
117
-
118
- <div id="method-M000010" class="method-detail">
119
- <a name="M000010"></a>
120
-
121
- <div class="method-heading">
122
- <a href="#M000010" class="method-signature">
123
- <span class="method-name">client</span><span class="method-args">()</span>
124
- </a>
125
- </div>
126
-
127
- <div class="method-description">
128
- <p>
129
- Lets an object that will forward method calls to the breakpoint client.
130
- This is useful for outputting longer things at the client and so on. You
131
- can for example do these things:
132
- </p>
133
- <pre>
134
- client.puts &quot;Hello&quot; # outputs &quot;Hello&quot; at client console
135
- # outputs &quot;Hello&quot; into the file temp.txt at the client
136
- client.File.open(&quot;temp.txt&quot;, &quot;w&quot;) { |f| f.puts &quot;Hello&quot; }
137
- </pre>
138
- <p><a class="source-toggle" href="#"
139
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
140
- <div class="method-source-code" id="M000010-source">
141
- <pre>
142
- <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 196</span>
143
- 196: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client</span>()
144
- 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>
145
- 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>
146
- 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>)
147
- 200: <span class="ruby-keyword kw">else</span>
148
- 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>) })
149
- 202: <span class="ruby-keyword kw">end</span>
150
- 203: <span class="ruby-keyword kw">end</span>
151
- </pre>
152
- </div>
153
- </div>
154
- </div>
155
-
156
- <div id="method-M000009" class="method-detail">
157
- <a name="M000009"></a>
158
-
159
- <div class="method-heading">
160
- <a href="#M000009" class="method-signature">
161
- <span class="method-name">source_lines</span><span class="method-args">(context = 5, return_line_numbers = false)</span>
162
- </a>
163
- </div>
164
-
165
- <div class="method-description">
166
- <p>
167
- Returns the source code surrounding the location where the breakpoint was
168
- issued.
169
- </p>
170
- <p><a class="source-toggle" href="#"
171
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
172
- <div class="method-source-code" id="M000009-source">
173
- <pre>
174
- <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 173</span>
175
- 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>)
176
- 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> }
177
- 175:
178
- 176: <span class="ruby-identifier">break_line</span> = <span class="ruby-ivar">@__bp_line</span>
179
- 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>
180
- 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>
181
- 179:
182
- 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>)]
183
- 181:
184
- 182: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">return_line_numbers</span> <span class="ruby-keyword kw">then</span>
185
- 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>]
186
- 184: <span class="ruby-keyword kw">else</span>
187
- 185: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
188
- 186: <span class="ruby-keyword kw">end</span>
189
- 187: <span class="ruby-keyword kw">end</span>
190
- </pre>
191
- </div>
192
- </div>
193
- </div>
194
-
195
-
196
- </div>
197
-
198
-
199
- </div>
200
-
201
-
202
- <div id="validator-badges">
203
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
204
- </div>
205
-
206
- </body>
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Breakpoint::CommandBundle</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Breakpoint::CommandBundle</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/breakpoint_rb.html">
59
+ lib/breakpoint.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+ <div id="description">
76
+ <p>
77
+ These commands are automatically available in all breakpoint shells.
78
+ </p>
79
+
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000013">client</a>&nbsp;&nbsp;
90
+ <a href="#M000012">source_lines</a>&nbsp;&nbsp;
91
+ </div>
92
+ </div>
93
+
94
+ </div>
95
+
96
+
97
+ <!-- if includes -->
98
+
99
+ <div id="section">
100
+
101
+ <div id="class-list">
102
+ <h3 class="section-bar">Classes and Modules</h3>
103
+
104
+ Class <a href="CommandBundle/Client.html" class="link">Breakpoint::CommandBundle::Client</a><br />
105
+
106
+ </div>
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+ <!-- if method_list -->
115
+ <div id="methods">
116
+ <h3 class="section-bar">Public Instance methods</h3>
117
+
118
+ <div id="method-M000013" class="method-detail">
119
+ <a name="M000013"></a>
120
+
121
+ <div class="method-heading">
122
+ <a href="#M000013" class="method-signature">
123
+ <span class="method-name">client</span><span class="method-args">()</span>
124
+ </a>
125
+ </div>
126
+
127
+ <div class="method-description">
128
+ <p>
129
+ Lets an object that will forward method calls to the breakpoint client.
130
+ This is useful for outputting longer things at the client and so on. You
131
+ can for example do these things:
132
+ </p>
133
+ <pre>
134
+ client.puts &quot;Hello&quot; # outputs &quot;Hello&quot; at client console
135
+ # outputs &quot;Hello&quot; into the file temp.txt at the client
136
+ client.File.open(&quot;temp.txt&quot;, &quot;w&quot;) { |f| f.puts &quot;Hello&quot; }
137
+ </pre>
138
+ <p><a class="source-toggle" href="#"
139
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
140
+ <div class="method-source-code" id="M000013-source">
141
+ <pre>
142
+ <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 216</span>
143
+ 216: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">client</span>()
144
+ 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>
145
+ 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>
146
+ 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>)
147
+ 220: <span class="ruby-keyword kw">else</span>
148
+ 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>) })
149
+ 222: <span class="ruby-keyword kw">end</span>
150
+ 223: <span class="ruby-keyword kw">end</span>
151
+ </pre>
152
+ </div>
153
+ </div>
154
+ </div>
155
+
156
+ <div id="method-M000012" class="method-detail">
157
+ <a name="M000012"></a>
158
+
159
+ <div class="method-heading">
160
+ <a href="#M000012" class="method-signature">
161
+ <span class="method-name">source_lines</span><span class="method-args">(context = 5, return_line_numbers = false)</span>
162
+ </a>
163
+ </div>
164
+
165
+ <div class="method-description">
166
+ <p>
167
+ Returns the source code surrounding the location where the breakpoint was
168
+ issued.
169
+ </p>
170
+ <p><a class="source-toggle" href="#"
171
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
172
+ <div class="method-source-code" id="M000012-source">
173
+ <pre>
174
+ <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 193</span>
175
+ 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>)
176
+ 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> }
177
+ 195:
178
+ 196: <span class="ruby-identifier">break_line</span> = <span class="ruby-ivar">@__bp_line</span>
179
+ 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>
180
+ 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>
181
+ 199:
182
+ 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>)]
183
+ 201:
184
+ 202: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">return_line_numbers</span> <span class="ruby-keyword kw">then</span>
185
+ 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>]
186
+ 204: <span class="ruby-keyword kw">else</span>
187
+ 205: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
188
+ 206: <span class="ruby-keyword kw">end</span>
189
+ 207: <span class="ruby-keyword kw">end</span>
190
+ </pre>
191
+ </div>
192
+ </div>
193
+ </div>
194
+
195
+
196
+ </div>
197
+
198
+
199
+ </div>
200
+
201
+
202
+ <div id="validator-badges">
203
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
204
+ </div>
205
+
206
+ </body>
207
207
  </html>
@@ -1,201 +1,233 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Breakpoint::CommandBundle::Client</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Breakpoint::CommandBundle::Client</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/breakpoint_rb.html">
59
- lib/breakpoint.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- Object
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
- <div id="description">
82
- <p>
83
- Proxy to a <a href="../../Breakpoint.html">Breakpoint</a> client. Lets you
84
- directly execute code in the context of the client.
85
- </p>
86
-
87
- </div>
88
-
89
-
90
- </div>
91
-
92
- <div id="method-list">
93
- <h3 class="section-bar">Methods</h3>
94
-
95
- <div class="name-list">
96
- <a href="#M000011">eval</a>&nbsp;&nbsp;
97
- <a href="#M000012">method_missing</a>&nbsp;&nbsp;
98
- </div>
99
- </div>
100
-
101
- </div>
102
-
103
-
104
- <!-- if includes -->
105
-
106
- <div id="section">
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
- <!-- if method_list -->
116
- <div id="methods">
117
- <h3 class="section-bar">Public Instance methods</h3>
118
-
119
- <div id="method-M000011" class="method-detail">
120
- <a name="M000011"></a>
121
-
122
- <div class="method-heading">
123
- <a href="#M000011" class="method-signature">
124
- <span class="method-name">eval</span><span class="method-args">(code)</span>
125
- </a>
126
- </div>
127
-
128
- <div class="method-description">
129
- <p>
130
- Executes the specified code at the client.
131
- </p>
132
- <p><a class="source-toggle" href="#"
133
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
134
- <div class="method-source-code" id="M000011-source">
135
- <pre>
136
- <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 143</span>
137
- 143: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">code</span>)
138
- 144: <span class="ruby-ivar">@eval_handler</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">code</span>)
139
- 145: <span class="ruby-keyword kw">end</span>
140
- </pre>
141
- </div>
142
- </div>
143
- </div>
144
-
145
- <div id="method-M000012" class="method-detail">
146
- <a name="M000012"></a>
147
-
148
- <div class="method-heading">
149
- <a href="#M000012" class="method-signature">
150
- <span class="method-name">method_missing</span><span class="method-args">(method, *args, &amp;block)</span>
151
- </a>
152
- </div>
153
-
154
- <div class="method-description">
155
- <p>
156
- Will execute the specified statement at the client.
157
- </p>
158
- <p><a class="source-toggle" href="#"
159
- onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
160
- <div class="method-source-code" id="M000012-source">
161
- <pre>
162
- <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 148</span>
163
- 148: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
164
- 149: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">block</span>
165
- 150: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">eval</span> <span class="ruby-node">&quot;#{method}&quot;</span>
166
- 151: <span class="ruby-keyword kw">else</span>
167
- 152: <span class="ruby-comment cmt"># This is a bit ugly. The alternative would be using an</span>
168
- 153: <span class="ruby-comment cmt"># eval context instead of an eval handler for executing</span>
169
- 154: <span class="ruby-comment cmt"># the code at the client. The problem with that approach</span>
170
- 155: <span class="ruby-comment cmt"># is that we would have to handle special expressions</span>
171
- 156: <span class="ruby-comment cmt"># like &quot;self&quot;, &quot;nil&quot; or constants ourself which is hard.</span>
172
- 157: <span class="ruby-identifier">remote</span> = <span class="ruby-identifier">eval</span> <span class="ruby-node">%{
173
- 158: result = lambda { |block, *args| #{method}(*args, &amp;block) }
174
- 159: def result.call_with_block(*args, &amp;block)
175
- 160: call(block, *args)
176
- 161: end
177
- 162: result
178
- 163: }</span>
179
- 164: <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">call_with_block</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
180
- 165: <span class="ruby-keyword kw">end</span>
181
- 166:
182
- 167: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
183
- 168: <span class="ruby-keyword kw">end</span>
184
- </pre>
185
- </div>
186
- </div>
187
- </div>
188
-
189
-
190
- </div>
191
-
192
-
193
- </div>
194
-
195
-
196
- <div id="validator-badges">
197
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
198
- </div>
199
-
200
- </body>
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: Breakpoint::CommandBundle::Client</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">Breakpoint::CommandBundle::Client</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/breakpoint_rb.html">
59
+ lib/breakpoint.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+ <div id="description">
82
+ <p>
83
+ Proxy to a <a href="../../Breakpoint.html">Breakpoint</a> client. Lets you
84
+ directly execute code in the context of the client.
85
+ </p>
86
+
87
+ </div>
88
+
89
+
90
+ </div>
91
+
92
+ <div id="method-list">
93
+ <h3 class="section-bar">Methods</h3>
94
+
95
+ <div class="name-list">
96
+ <a href="#M000014">eval</a>&nbsp;&nbsp;
97
+ <a href="#M000016">method_missing</a>&nbsp;&nbsp;
98
+ <a href="#M000015">require</a>&nbsp;&nbsp;
99
+ </div>
100
+ </div>
101
+
102
+ </div>
103
+
104
+
105
+ <!-- if includes -->
106
+
107
+ <div id="section">
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+ <!-- if method_list -->
117
+ <div id="methods">
118
+ <h3 class="section-bar">Public Instance methods</h3>
119
+
120
+ <div id="method-M000014" class="method-detail">
121
+ <a name="M000014"></a>
122
+
123
+ <div class="method-heading">
124
+ <a href="#M000014" class="method-signature">
125
+ <span class="method-name">eval</span><span class="method-args">(code)</span>
126
+ </a>
127
+ </div>
128
+
129
+ <div class="method-description">
130
+ <p>
131
+ Executes the specified code at the client.
132
+ </p>
133
+ <p><a class="source-toggle" href="#"
134
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
135
+ <div class="method-source-code" id="M000014-source">
136
+ <pre>
137
+ <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 153</span>
138
+ 153: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">code</span>)
139
+ 154: <span class="ruby-ivar">@eval_handler</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">code</span>)
140
+ 155: <span class="ruby-keyword kw">end</span>
141
+ </pre>
142
+ </div>
143
+ </div>
144
+ </div>
145
+
146
+ <div id="method-M000016" class="method-detail">
147
+ <a name="M000016"></a>
148
+
149
+ <div class="method-heading">
150
+ <a href="#M000016" class="method-signature">
151
+ <span class="method-name">method_missing</span><span class="method-args">(method, *args, &amp;block)</span>
152
+ </a>
153
+ </div>
154
+
155
+ <div class="method-description">
156
+ <p>
157
+ Will execute the specified statement at the client.
158
+ </p>
159
+ <p><a class="source-toggle" href="#"
160
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
161
+ <div class="method-source-code" id="M000016-source">
162
+ <pre>
163
+ <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 168</span>
164
+ 168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
165
+ 169: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">block</span>
166
+ 170: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">eval</span> <span class="ruby-node">&quot;#{method}&quot;</span>
167
+ 171: <span class="ruby-keyword kw">else</span>
168
+ 172: <span class="ruby-comment cmt"># This is a bit ugly. The alternative would be using an
169
+ 173: <span class="ruby-comment cmt"># eval context instead of an eval handler for executing
170
+ 174: <span class="ruby-comment cmt"># the code at the client. The problem with that approach
171
+ 175: <span class="ruby-comment cmt"># is that we would have to handle special expressions
172
+ 176: <span class="ruby-comment cmt"># like &quot;self&quot;, &quot;nil&quot; or constants ourself which is hard.
173
+ 177: <span class="ruby-identifier">remote</span> = <span class="ruby-identifier">eval</span> <span class="ruby-node">%{
174
+ 178: result = lambda { |block, *args| self.send(#{method.inspect}, *args, &amp;block) }
175
+ 179: def result.call_with_block(*args, &amp;block)
176
+ 180: call(block, *args)
177
+ 181: end
178
+ 182: result
179
+ 183: }</span>
180
+ 184: <span class="ruby-identifier">remote</span>.<span class="ruby-identifier">call_with_block</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
181
+ 185: <span class="ruby-keyword kw">end</span>
182
+ 186:
183
+ 187: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
184
+ 188: <span class="ruby-keyword kw">end</span>
185
+ </pre>
186
+ </div>
187
+ </div>
188
+ </div>
189
+
190
+ <div id="method-M000015" class="method-detail">
191
+ <a name="M000015"></a>
192
+
193
+ <div class="method-heading">
194
+ <a href="#M000015" class="method-signature">
195
+ <span class="method-name">require</span><span class="method-args">(*args, &amp;block)</span>
196
+ </a>
197
+ </div>
198
+
199
+ <div class="method-description">
200
+ <p>
201
+ Need to work around an odd RubyGems issue that causes it to not load
202
+ libraries&#8230;
203
+ </p>
204
+ <p><a class="source-toggle" href="#"
205
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
206
+ <div class="method-source-code" id="M000015-source">
207
+ <pre>
208
+ <span class="ruby-comment cmt"># File lib/breakpoint.rb, line 159</span>
209
+ 159: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">require</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
210
+ 160: <span class="ruby-keyword kw">begin</span>
211
+ 161: <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">:require__</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
212
+ 162: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span>
213
+ 163: <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">:require</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
214
+ 164: <span class="ruby-keyword kw">end</span>
215
+ 165: <span class="ruby-keyword kw">end</span>
216
+ </pre>
217
+ </div>
218
+ </div>
219
+ </div>
220
+
221
+
222
+ </div>
223
+
224
+
225
+ </div>
226
+
227
+
228
+ <div id="validator-badges">
229
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
230
+ </div>
231
+
232
+ </body>
201
233
  </html>