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.
- data/Manifest +38 -35
- data/NEWS +14 -0
- data/README +4 -4
- data/TODO +4 -0
- data/bin/breakpoint_client +1 -212
- data/doc/classes/Binding.html +237 -220
- data/doc/classes/Breakpoint.html +552 -539
- data/doc/classes/Breakpoint/CommandBundle.html +206 -206
- data/doc/classes/Breakpoint/CommandBundle/Client.html +232 -200
- data/doc/classes/Breakpoint/FailedAssertError.html +117 -117
- data/doc/classes/Handlers.html +230 -0
- data/doc/created.rid +1 -1
- data/doc/files/COPYING.html +162 -162
- data/doc/files/NEWS.html +168 -134
- data/doc/files/README.html +154 -153
- data/doc/files/TODO.html +166 -161
- data/doc/files/lib/binding_of_caller_rb.html +100 -100
- data/doc/files/lib/breakpoint_client_rb.html +131 -0
- data/doc/files/lib/breakpoint_rb.html +201 -201
- data/doc/fr_class_index.html +31 -30
- data/doc/fr_file_index.html +32 -31
- data/doc/fr_method_index.html +41 -37
- data/doc/index.html +23 -23
- data/doc/rdoc-style.css +207 -207
- data/lib/binding_of_caller.rb +16 -2
- data/lib/breakpoint.rb +34 -7
- data/lib/breakpoint_client.rb +214 -0
- metadata +63 -57
@@ -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="#
|
90
|
-
<a href="#
|
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-
|
119
|
-
<a name="
|
120
|
-
|
121
|
-
<div class="method-heading">
|
122
|
-
<a href="#
|
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 "Hello" # outputs "Hello" at client console
|
135
|
-
# outputs "Hello" into the file temp.txt at the client
|
136
|
-
client.File.open("temp.txt", "w") { |f| f.puts "Hello" }
|
137
|
-
</pre>
|
138
|
-
<p><a class="source-toggle" href="#"
|
139
|
-
onclick="toggleCode('
|
140
|
-
<div class="method-source-code" id="
|
141
|
-
<pre>
|
142
|
-
<span class="ruby-comment cmt"># File lib/breakpoint.rb, line
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
</pre>
|
152
|
-
</div>
|
153
|
-
</div>
|
154
|
-
</div>
|
155
|
-
|
156
|
-
<div id="method-
|
157
|
-
<a name="
|
158
|
-
|
159
|
-
<div class="method-heading">
|
160
|
-
<a href="#
|
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('
|
172
|
-
<div class="method-source-code" id="
|
173
|
-
<pre>
|
174
|
-
<span class="ruby-comment cmt"># File lib/breakpoint.rb, line
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
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>
|
90
|
+
<a href="#M000012">source_lines</a>
|
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 "Hello" # outputs "Hello" at client console
|
135
|
+
# outputs "Hello" into the file temp.txt at the client
|
136
|
+
client.File.open("temp.txt", "w") { |f| f.puts "Hello" }
|
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="#
|
97
|
-
<a href="#
|
98
|
-
</
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
<
|
125
|
-
</
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
<
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
</
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
<
|
151
|
-
</
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
<
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
</
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
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>
|
97
|
+
<a href="#M000016">method_missing</a>
|
98
|
+
<a href="#M000015">require</a>
|
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, &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">&</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">"#{method}"</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 "self", "nil" 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, &block) }
|
175
|
+
179: def result.call_with_block(*args, &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">&</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, &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…
|
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">&</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">&</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">&</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>
|