context 0.0.16 → 0.0.22

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