context 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. data/Rakefile.rb +107 -0
  2. data/coverage/-usr-local-lib-site_ruby-1_8-atk_rb.html +612 -0
  3. data/coverage/-usr-local-lib-site_ruby-1_8-gdk_pixbuf2_rb.html +637 -0
  4. data/coverage/-usr-local-lib-site_ruby-1_8-glib2_rb.html +829 -0
  5. data/coverage/-usr-local-lib-site_ruby-1_8-gtk2-base_rb.html +709 -0
  6. data/coverage/-usr-local-lib-site_ruby-1_8-gtk2_rb.html +623 -0
  7. data/coverage/-usr-local-lib-site_ruby-1_8-pango_rb.html +665 -0
  8. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-color_rb.html +865 -0
  9. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-colors_rb.html +1266 -0
  10. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-constants_rb.html +632 -0
  11. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-blur_rb.html +655 -0
  12. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-circle_rb.html +619 -0
  13. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-color_rb.html +621 -0
  14. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-path_rb.html +726 -0
  15. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-rectangle_rb.html +643 -0
  16. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context-triangle_rb.html +622 -0
  17. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-context_rb.html +639 -0
  18. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-paper_rb.html +793 -0
  19. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-papers_rb.html +651 -0
  20. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-path_rb.html +625 -0
  21. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo-point_rb.html +617 -0
  22. data/coverage/-var-lib-gems-1_8-gems-cairo-1_7_0-src-lib-cairo_rb.html +756 -0
  23. data/coverage/index.html +1170 -0
  24. data/coverage/lib-Context-Bridge_rb.html +673 -0
  25. data/coverage/lib-Context-Context_rb.html +756 -0
  26. data/coverage/lib-Context-EnumeratedType_rb.html +661 -0
  27. data/coverage/lib-Context-ExecutionProxy_rb.html +671 -0
  28. data/coverage/lib-Context-Gtk-App_rb.html +638 -0
  29. data/coverage/lib-Context-Gtk-Key_rb.html +664 -0
  30. data/coverage/lib-Context-Gtk-Widget_rb.html +667 -0
  31. data/coverage/lib-Context-KeyAssignment_rb.html +641 -0
  32. data/coverage/lib-Context-KeyMap_rb.html +653 -0
  33. data/coverage/lib-Context-Key_rb.html +667 -0
  34. data/coverage/lib-Context-View_rb.html +659 -0
  35. data/coverage/lib-Context-Views-Gtk-PageView_rb.html +660 -0
  36. data/coverage/lib-Context-Views-PageView_rb.html +627 -0
  37. data/coverage/lib-Context-Widget_rb.html +650 -0
  38. data/coverage/lib-Context-require_all_rb.html +623 -0
  39. data/doc/classes/Context.html +174 -0
  40. data/doc/classes/Context/Bridge.html +296 -0
  41. data/doc/classes/Context/Context.html +564 -0
  42. data/doc/classes/Context/EnumeratedType.html +283 -0
  43. data/doc/classes/Context/ExecutionProxy.html +228 -0
  44. data/doc/classes/Context/Gtk.html +126 -0
  45. data/doc/classes/Context/Gtk/App.html +217 -0
  46. data/doc/classes/Context/Gtk/Key.html +292 -0
  47. data/doc/classes/Context/Gtk/PageView.html +245 -0
  48. data/doc/classes/Context/Gtk/PageView/MainWindow.html +200 -0
  49. data/doc/classes/Context/Gtk/Widget.html +311 -0
  50. data/doc/classes/Context/Key.html +305 -0
  51. data/doc/classes/Context/Key/Modifier.html +117 -0
  52. data/doc/classes/Context/KeyAssignment.html +234 -0
  53. data/doc/classes/Context/KeyMap.html +273 -0
  54. data/doc/classes/Context/PageView.html +180 -0
  55. data/doc/classes/Context/View.html +334 -0
  56. data/doc/classes/Context/Widget.html +298 -0
  57. data/doc/classes/Kernel.html +148 -0
  58. data/doc/classes/Object.html +196 -0
  59. data/doc/created.rid +1 -0
  60. data/doc/files/lib/Context/Bridge_rb.html +108 -0
  61. data/doc/files/lib/Context/Context_rb.html +109 -0
  62. data/doc/files/lib/Context/EnumeratedType_rb.html +101 -0
  63. data/doc/files/lib/Context/ExecutionProxy_rb.html +101 -0
  64. data/doc/files/lib/Context/Gtk/App_rb.html +110 -0
  65. data/doc/files/lib/Context/Gtk/Key_rb.html +109 -0
  66. data/doc/files/lib/Context/Gtk/Widget_rb.html +109 -0
  67. data/doc/files/lib/Context/KeyAssignment_rb.html +108 -0
  68. data/doc/files/lib/Context/KeyMap_rb.html +109 -0
  69. data/doc/files/lib/Context/Key_rb.html +108 -0
  70. data/doc/files/lib/Context/Version_rb.html +101 -0
  71. data/doc/files/lib/Context/View_rb.html +101 -0
  72. data/doc/files/lib/Context/Views/Gtk/PageView_rb.html +111 -0
  73. data/doc/files/lib/Context/Views/PageView_rb.html +108 -0
  74. data/doc/files/lib/Context/Widget_rb.html +101 -0
  75. data/doc/files/lib/Context/require_all_rb.html +101 -0
  76. data/doc/fr_class_index.html +46 -0
  77. data/doc/fr_file_index.html +42 -0
  78. data/doc/fr_method_index.html +103 -0
  79. data/doc/index.html +24 -0
  80. data/doc/rdoc-style.css +208 -0
  81. data/lib/Context/Bridge.rb +63 -0
  82. data/lib/Context/Context.rb +146 -0
  83. data/lib/Context/EnumeratedType.rb +51 -0
  84. data/lib/Context/ExecutionProxy.rb +61 -0
  85. data/lib/Context/Gtk/App.rb +28 -0
  86. data/lib/Context/Gtk/Key.rb +54 -0
  87. data/lib/Context/Gtk/Widget.rb +57 -0
  88. data/lib/Context/Key.rb +57 -0
  89. data/lib/Context/KeyAssignment.rb +31 -0
  90. data/lib/Context/KeyMap.rb +43 -0
  91. data/lib/Context/Version.rb +5 -0
  92. data/lib/Context/View.rb +49 -0
  93. data/lib/Context/Views/Gtk/PageView.rb +50 -0
  94. data/lib/Context/Views/PageView.rb +17 -0
  95. data/lib/Context/Widget.rb +40 -0
  96. data/lib/Context/require_all.rb +13 -0
  97. data/spec/Context/Bridge_spec.rb +40 -0
  98. data/spec/Context/Context_spec.rb +102 -0
  99. data/spec/Context/EnumeratedType_spec.rb +51 -0
  100. data/spec/Context/ExecutionProxy_spec.rb +28 -0
  101. data/spec/Context/Gtk/App_spec.rb +24 -0
  102. data/spec/Context/Gtk/Key_spec.rb +45 -0
  103. data/spec/Context/Gtk/Widget_spec.rb +44 -0
  104. data/spec/Context/KeyAssignment_spec.rb +26 -0
  105. data/spec/Context/KeyMap_spec.rb +64 -0
  106. data/spec/Context/Key_spec.rb +22 -0
  107. data/spec/Context/View_spec.rb +62 -0
  108. data/spec/Context/Views/Gtk/PageView_spec.rb +44 -0
  109. data/spec/Context/Views/PageView_spec.rb +20 -0
  110. data/spec/Context/Widget_spec.rb +15 -0
  111. data/spec/Context/require_all_spec.rb +13 -0
  112. data/test_results.html +343 -0
  113. 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>&nbsp;&nbsp;
101
+ <a href="#M000033">method_missing</a>&nbsp;&nbsp;
102
+ <a href="#M000032">responds_to?</a>&nbsp;&nbsp;
103
+ <a href="#M000029">start_at</a>&nbsp;&nbsp;
104
+ <a href="#M000031">symbols</a>&nbsp;&nbsp;
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&#8216;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>&nbsp;&nbsp;
98
+ <a href="#M000028">method_missing</a>&nbsp;&nbsp;
99
+ <a href="#M000026">new</a>&nbsp;&nbsp;
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">(&amp;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&#8216;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">&amp;</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">&amp;</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>