context 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile.rb +107 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-atk_rb.html +612 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-gdk_pixbuf2_rb.html +637 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-glib2_rb.html +829 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-gtk2-base_rb.html +709 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-gtk2_rb.html +623 -0
- data/coverage/-usr-local-lib-site_ruby-1_8-pango_rb.html +665 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-color_rb.html +865 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-colors_rb.html +1266 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-constants_rb.html +632 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-blur_rb.html +655 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-circle_rb.html +619 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-color_rb.html +621 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-path_rb.html +726 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-rectangle_rb.html +643 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-triangle_rb.html +622 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context_rb.html +639 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-paper_rb.html +793 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-papers_rb.html +651 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-path_rb.html +625 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-point_rb.html +617 -0
- data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo_rb.html +756 -0
- data/coverage/index.html +1170 -0
- data/coverage/lib-Context-Bridge_rb.html +673 -0
- data/coverage/lib-Context-Context_rb.html +756 -0
- data/coverage/lib-Context-EnumeratedType_rb.html +661 -0
- data/coverage/lib-Context-ExecutionProxy_rb.html +671 -0
- data/coverage/lib-Context-Gtk-App_rb.html +638 -0
- data/coverage/lib-Context-Gtk-Key_rb.html +664 -0
- data/coverage/lib-Context-Gtk-Widget_rb.html +667 -0
- data/coverage/lib-Context-KeyAssignment_rb.html +641 -0
- data/coverage/lib-Context-KeyMap_rb.html +653 -0
- data/coverage/lib-Context-Key_rb.html +667 -0
- data/coverage/lib-Context-View_rb.html +659 -0
- data/coverage/lib-Context-Views-Gtk-PageView_rb.html +660 -0
- data/coverage/lib-Context-Views-PageView_rb.html +627 -0
- data/coverage/lib-Context-Widget_rb.html +650 -0
- data/coverage/lib-Context-require_all_rb.html +623 -0
- data/doc/classes/Context.html +174 -0
- data/doc/classes/Context/Bridge.html +296 -0
- data/doc/classes/Context/Context.html +564 -0
- data/doc/classes/Context/EnumeratedType.html +283 -0
- data/doc/classes/Context/ExecutionProxy.html +228 -0
- data/doc/classes/Context/Gtk.html +126 -0
- data/doc/classes/Context/Gtk/App.html +217 -0
- data/doc/classes/Context/Gtk/Key.html +292 -0
- data/doc/classes/Context/Gtk/PageView.html +245 -0
- data/doc/classes/Context/Gtk/PageView/MainWindow.html +200 -0
- data/doc/classes/Context/Gtk/Widget.html +311 -0
- data/doc/classes/Context/Key.html +305 -0
- data/doc/classes/Context/Key/Modifier.html +117 -0
- data/doc/classes/Context/KeyAssignment.html +234 -0
- data/doc/classes/Context/KeyMap.html +273 -0
- data/doc/classes/Context/PageView.html +180 -0
- data/doc/classes/Context/View.html +334 -0
- data/doc/classes/Context/Widget.html +298 -0
- data/doc/classes/Kernel.html +148 -0
- data/doc/classes/Object.html +196 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/Context/Bridge_rb.html +108 -0
- data/doc/files/lib/Context/Context_rb.html +109 -0
- data/doc/files/lib/Context/EnumeratedType_rb.html +101 -0
- data/doc/files/lib/Context/ExecutionProxy_rb.html +101 -0
- data/doc/files/lib/Context/Gtk/App_rb.html +110 -0
- data/doc/files/lib/Context/Gtk/Key_rb.html +109 -0
- data/doc/files/lib/Context/Gtk/Widget_rb.html +109 -0
- data/doc/files/lib/Context/KeyAssignment_rb.html +108 -0
- data/doc/files/lib/Context/KeyMap_rb.html +109 -0
- data/doc/files/lib/Context/Key_rb.html +108 -0
- data/doc/files/lib/Context/Version_rb.html +101 -0
- data/doc/files/lib/Context/View_rb.html +101 -0
- data/doc/files/lib/Context/Views/Gtk/PageView_rb.html +111 -0
- data/doc/files/lib/Context/Views/PageView_rb.html +108 -0
- data/doc/files/lib/Context/Widget_rb.html +101 -0
- data/doc/files/lib/Context/require_all_rb.html +101 -0
- data/doc/fr_class_index.html +46 -0
- data/doc/fr_file_index.html +42 -0
- data/doc/fr_method_index.html +103 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/Context/Bridge.rb +63 -0
- data/lib/Context/Context.rb +146 -0
- data/lib/Context/EnumeratedType.rb +51 -0
- data/lib/Context/ExecutionProxy.rb +61 -0
- data/lib/Context/Gtk/App.rb +28 -0
- data/lib/Context/Gtk/Key.rb +54 -0
- data/lib/Context/Gtk/Widget.rb +57 -0
- data/lib/Context/Key.rb +57 -0
- data/lib/Context/KeyAssignment.rb +31 -0
- data/lib/Context/KeyMap.rb +43 -0
- data/lib/Context/Version.rb +5 -0
- data/lib/Context/View.rb +49 -0
- data/lib/Context/Views/Gtk/PageView.rb +50 -0
- data/lib/Context/Views/PageView.rb +17 -0
- data/lib/Context/Widget.rb +40 -0
- data/lib/Context/require_all.rb +13 -0
- data/spec/Context/Bridge_spec.rb +40 -0
- data/spec/Context/Context_spec.rb +102 -0
- data/spec/Context/EnumeratedType_spec.rb +51 -0
- data/spec/Context/ExecutionProxy_spec.rb +28 -0
- data/spec/Context/Gtk/App_spec.rb +24 -0
- data/spec/Context/Gtk/Key_spec.rb +45 -0
- data/spec/Context/Gtk/Widget_spec.rb +44 -0
- data/spec/Context/KeyAssignment_spec.rb +26 -0
- data/spec/Context/KeyMap_spec.rb +64 -0
- data/spec/Context/Key_spec.rb +22 -0
- data/spec/Context/View_spec.rb +62 -0
- data/spec/Context/Views/Gtk/PageView_spec.rb +44 -0
- data/spec/Context/Views/PageView_spec.rb +20 -0
- data/spec/Context/Widget_spec.rb +15 -0
- data/spec/Context/require_all_spec.rb +13 -0
- data/test_results.html +343 -0
- metadata +179 -0
@@ -0,0 +1,283 @@
|
|
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: Context::EnumeratedType</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">Context::EnumeratedType</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/Context/EnumeratedType_rb.html">
|
59
|
+
lib/Context/EnumeratedType.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
|
+
<a href="../Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
Class that holds a series of constants that act as an enumerated type. The
|
86
|
+
first ID added to the type is set to the value 0 (or at the value specified
|
87
|
+
in <a href="EnumeratedType.html#M000029">start_at</a>). each subsequent ID
|
88
|
+
added to the type is automatically incremented
|
89
|
+
</p>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
<div id="method-list">
|
97
|
+
<h3 class="section-bar">Methods</h3>
|
98
|
+
|
99
|
+
<div class="name-list">
|
100
|
+
<a href="#M000030">add</a>
|
101
|
+
<a href="#M000033">method_missing</a>
|
102
|
+
<a href="#M000032">responds_to?</a>
|
103
|
+
<a href="#M000029">start_at</a>
|
104
|
+
<a href="#M000031">symbols</a>
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
</div>
|
109
|
+
|
110
|
+
|
111
|
+
<!-- if includes -->
|
112
|
+
|
113
|
+
<div id="section">
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<!-- if method_list -->
|
123
|
+
<div id="methods">
|
124
|
+
<h3 class="section-bar">Public Class methods</h3>
|
125
|
+
|
126
|
+
<div id="method-M000030" class="method-detail">
|
127
|
+
<a name="M000030"></a>
|
128
|
+
|
129
|
+
<div class="method-heading">
|
130
|
+
<a href="#M000030" class="method-signature">
|
131
|
+
<span class="method-name">add</span><span class="method-args">(id)</span>
|
132
|
+
</a>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<div class="method-description">
|
136
|
+
<p>
|
137
|
+
Add a single ID to the enumerated type Usually called like:
|
138
|
+
</p>
|
139
|
+
<pre>
|
140
|
+
add MY_ID
|
141
|
+
</pre>
|
142
|
+
<p><a class="source-toggle" href="#"
|
143
|
+
onclick="toggleCode('M000030-source');return false;">[Source]</a></p>
|
144
|
+
<div class="method-source-code" id="M000030-source">
|
145
|
+
<pre>
|
146
|
+
<span class="ruby-comment cmt"># File lib/Context/EnumeratedType.rb, line 20</span>
|
147
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-identifier">id</span>)
|
148
|
+
<span class="ruby-ivar">@nextValue</span> <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
|
149
|
+
<span class="ruby-identifier">const_set</span>(<span class="ruby-identifier">id</span>, <span class="ruby-ivar">@nextValue</span>)
|
150
|
+
<span class="ruby-ivar">@nextValue</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
151
|
+
<span class="ruby-keyword kw">end</span>
|
152
|
+
</pre>
|
153
|
+
</div>
|
154
|
+
</div>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<div id="method-M000033" class="method-detail">
|
158
|
+
<a name="M000033"></a>
|
159
|
+
|
160
|
+
<div class="method-heading">
|
161
|
+
<a href="#M000033" class="method-signature">
|
162
|
+
<span class="method-name">method_missing</span><span class="method-args">(id)</span>
|
163
|
+
</a>
|
164
|
+
</div>
|
165
|
+
|
166
|
+
<div class="method-description">
|
167
|
+
<p>
|
168
|
+
Retrieve the value of the ID If the ID is defined, return it‘s value.
|
169
|
+
</p>
|
170
|
+
<p><a class="source-toggle" href="#"
|
171
|
+
onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
|
172
|
+
<div class="method-source-code" id="M000033-source">
|
173
|
+
<pre>
|
174
|
+
<span class="ruby-comment cmt"># File lib/Context/EnumeratedType.rb, line 44</span>
|
175
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">id</span>)
|
176
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">id2name</span>
|
177
|
+
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">const_defined?</span>(<span class="ruby-identifier">name</span>)
|
178
|
+
<span class="ruby-keyword kw">end</span>
|
179
|
+
</pre>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
<div id="method-M000032" class="method-detail">
|
185
|
+
<a name="M000032"></a>
|
186
|
+
|
187
|
+
<div class="method-heading">
|
188
|
+
<a href="#M000032" class="method-signature">
|
189
|
+
<span class="method-name">responds_to?</span><span class="method-args">(id)</span>
|
190
|
+
</a>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
<div class="method-description">
|
194
|
+
<p>
|
195
|
+
Returns true if the ID has been defined in the enumerated type.
|
196
|
+
</p>
|
197
|
+
<p><a class="source-toggle" href="#"
|
198
|
+
onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
|
199
|
+
<div class="method-source-code" id="M000032-source">
|
200
|
+
<pre>
|
201
|
+
<span class="ruby-comment cmt"># File lib/Context/EnumeratedType.rb, line 37</span>
|
202
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">responds_to?</span>(<span class="ruby-identifier">id</span>)
|
203
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">id2name</span>
|
204
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">const_defined?</span>(<span class="ruby-identifier">name</span>)
|
205
|
+
<span class="ruby-keyword kw">end</span>
|
206
|
+
</pre>
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div id="method-M000029" class="method-detail">
|
212
|
+
<a name="M000029"></a>
|
213
|
+
|
214
|
+
<div class="method-heading">
|
215
|
+
<a href="#M000029" class="method-signature">
|
216
|
+
<span class="method-name">start_at</span><span class="method-args">(n)</span>
|
217
|
+
</a>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div class="method-description">
|
221
|
+
<p>
|
222
|
+
Set the value that the first ID should start at. Note: This must called
|
223
|
+
<b>before</b> <a href="EnumeratedType.html#M000030">add</a>() or <a
|
224
|
+
href="EnumeratedType.html#M000031">symbols</a>()
|
225
|
+
</p>
|
226
|
+
<p><a class="source-toggle" href="#"
|
227
|
+
onclick="toggleCode('M000029-source');return false;">[Source]</a></p>
|
228
|
+
<div class="method-source-code" id="M000029-source">
|
229
|
+
<pre>
|
230
|
+
<span class="ruby-comment cmt"># File lib/Context/EnumeratedType.rb, line 13</span>
|
231
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_at</span>(<span class="ruby-identifier">n</span>)
|
232
|
+
<span class="ruby-ivar">@nextValue</span> = <span class="ruby-identifier">n</span>
|
233
|
+
<span class="ruby-keyword kw">end</span>
|
234
|
+
</pre>
|
235
|
+
</div>
|
236
|
+
</div>
|
237
|
+
</div>
|
238
|
+
|
239
|
+
<div id="method-M000031" class="method-detail">
|
240
|
+
<a name="M000031"></a>
|
241
|
+
|
242
|
+
<div class="method-heading">
|
243
|
+
<a href="#M000031" class="method-signature">
|
244
|
+
<span class="method-name">symbols</span><span class="method-args">(array)</span>
|
245
|
+
</a>
|
246
|
+
</div>
|
247
|
+
|
248
|
+
<div class="method-description">
|
249
|
+
<p>
|
250
|
+
Add a group of IDs to the enumerated type. This method takes an array.
|
251
|
+
Usually called like:
|
252
|
+
</p>
|
253
|
+
<pre>
|
254
|
+
symbols [ID1, ID2, ID3,...]
|
255
|
+
</pre>
|
256
|
+
<p><a class="source-toggle" href="#"
|
257
|
+
onclick="toggleCode('M000031-source');return false;">[Source]</a></p>
|
258
|
+
<div class="method-source-code" id="M000031-source">
|
259
|
+
<pre>
|
260
|
+
<span class="ruby-comment cmt"># File lib/Context/EnumeratedType.rb, line 30</span>
|
261
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbols</span>(<span class="ruby-identifier">array</span>)
|
262
|
+
<span class="ruby-identifier">array</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
|
263
|
+
<span class="ruby-identifier">add</span>(<span class="ruby-identifier">id</span>)
|
264
|
+
<span class="ruby-keyword kw">end</span>
|
265
|
+
<span class="ruby-keyword kw">end</span>
|
266
|
+
</pre>
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
|
272
|
+
</div>
|
273
|
+
|
274
|
+
|
275
|
+
</div>
|
276
|
+
|
277
|
+
|
278
|
+
<div id="validator-badges">
|
279
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
280
|
+
</div>
|
281
|
+
|
282
|
+
</body>
|
283
|
+
</html>
|
@@ -0,0 +1,228 @@
|
|
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: Context::ExecutionProxy</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">Context::ExecutionProxy</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/Context/ExecutionProxy_rb.html">
|
59
|
+
lib/Context/ExecutionProxy.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
|
+
<a href="../Object.html">
|
69
|
+
Object
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
A Proxy for carrying on conditional execution.
|
86
|
+
</p>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div id="method-list">
|
94
|
+
<h3 class="section-bar">Methods</h3>
|
95
|
+
|
96
|
+
<div class="name-list">
|
97
|
+
<a href="#M000027">execute_if_you_can</a>
|
98
|
+
<a href="#M000028">method_missing</a>
|
99
|
+
<a href="#M000026">new</a>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<!-- if includes -->
|
107
|
+
|
108
|
+
<div id="section">
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
<!-- if method_list -->
|
118
|
+
<div id="methods">
|
119
|
+
<h3 class="section-bar">Public Class methods</h3>
|
120
|
+
|
121
|
+
<div id="method-M000026" class="method-detail">
|
122
|
+
<a name="M000026"></a>
|
123
|
+
|
124
|
+
<div class="method-heading">
|
125
|
+
<a href="#M000026" class="method-signature">
|
126
|
+
<span class="method-name">new</span><span class="method-args">(object, cond)</span>
|
127
|
+
</a>
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div class="method-description">
|
131
|
+
<p>
|
132
|
+
Set the true object on which to execute and the condition to execute. NOTE:
|
133
|
+
The condition is a bool. In other words it has <b>already</b> been
|
134
|
+
evaluated before we get to this point.
|
135
|
+
</p>
|
136
|
+
<p><a class="source-toggle" href="#"
|
137
|
+
onclick="toggleCode('M000026-source');return false;">[Source]</a></p>
|
138
|
+
<div class="method-source-code" id="M000026-source">
|
139
|
+
<pre>
|
140
|
+
<span class="ruby-comment cmt"># File lib/Context/ExecutionProxy.rb, line 8</span>
|
141
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">cond</span>)
|
142
|
+
<span class="ruby-ivar">@object</span> = <span class="ruby-identifier">object</span>
|
143
|
+
<span class="ruby-ivar">@cond</span> = <span class="ruby-identifier">cond</span>
|
144
|
+
<span class="ruby-keyword kw">end</span>
|
145
|
+
</pre>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
151
|
+
|
152
|
+
<div id="method-M000027" class="method-detail">
|
153
|
+
<a name="M000027"></a>
|
154
|
+
|
155
|
+
<div class="method-heading">
|
156
|
+
<a href="#M000027" class="method-signature">
|
157
|
+
<span class="method-name">execute_if_you_can</span><span class="method-args">(&block)</span>
|
158
|
+
</a>
|
159
|
+
</div>
|
160
|
+
|
161
|
+
<div class="method-description">
|
162
|
+
<p>
|
163
|
+
Conditionally execute the block. If the condition is true, execute the
|
164
|
+
block. Otherwise return the true object. NOTE: Crazy name is so that you
|
165
|
+
don‘t have something with the same name and accidently call it with
|
166
|
+
<a href="ExecutionProxy.html#M000028">method_missing</a>.
|
167
|
+
</p>
|
168
|
+
<p><a class="source-toggle" href="#"
|
169
|
+
onclick="toggleCode('M000027-source');return false;">[Source]</a></p>
|
170
|
+
<div class="method-source-code" id="M000027-source">
|
171
|
+
<pre>
|
172
|
+
<span class="ruby-comment cmt"># File lib/Context/ExecutionProxy.rb, line 17</span>
|
173
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute_if_you_can</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
174
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@cond</span>
|
175
|
+
<span class="ruby-ivar">@object</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
176
|
+
<span class="ruby-keyword kw">else</span>
|
177
|
+
<span class="ruby-ivar">@object</span>
|
178
|
+
<span class="ruby-keyword kw">end</span>
|
179
|
+
<span class="ruby-keyword kw">end</span>
|
180
|
+
</pre>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
|
185
|
+
<div id="method-M000028" class="method-detail">
|
186
|
+
<a name="M000028"></a>
|
187
|
+
|
188
|
+
<div class="method-heading">
|
189
|
+
<a href="#M000028" class="method-signature">
|
190
|
+
<span class="method-name">method_missing</span><span class="method-args">(symbol)</span>
|
191
|
+
</a>
|
192
|
+
</div>
|
193
|
+
|
194
|
+
<div class="method-description">
|
195
|
+
<p>
|
196
|
+
Conditionally evaluate the symbol. If the condition is true, evaluate the
|
197
|
+
symbol. Otherwise return the true object.
|
198
|
+
</p>
|
199
|
+
<p><a class="source-toggle" href="#"
|
200
|
+
onclick="toggleCode('M000028-source');return false;">[Source]</a></p>
|
201
|
+
<div class="method-source-code" id="M000028-source">
|
202
|
+
<pre>
|
203
|
+
<span class="ruby-comment cmt"># File lib/Context/ExecutionProxy.rb, line 27</span>
|
204
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">symbol</span>)
|
205
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@cond</span>
|
206
|
+
<span class="ruby-ivar">@object</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>)
|
207
|
+
<span class="ruby-keyword kw">else</span>
|
208
|
+
<span class="ruby-ivar">@object</span>
|
209
|
+
<span class="ruby-keyword kw">end</span>
|
210
|
+
<span class="ruby-keyword kw">end</span>
|
211
|
+
</pre>
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
</div>
|
215
|
+
|
216
|
+
|
217
|
+
</div>
|
218
|
+
|
219
|
+
|
220
|
+
</div>
|
221
|
+
|
222
|
+
|
223
|
+
<div id="validator-badges">
|
224
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
225
|
+
</div>
|
226
|
+
|
227
|
+
</body>
|
228
|
+
</html>
|