context 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,174 @@
|
|
|
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: Context</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">Context</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../files/lib/Context/Context_rb.html">
|
|
59
|
+
lib/Context/Context.rb
|
|
60
|
+
</a>
|
|
61
|
+
<br />
|
|
62
|
+
<a href="../files/lib/Context/EnumeratedType_rb.html">
|
|
63
|
+
lib/Context/EnumeratedType.rb
|
|
64
|
+
</a>
|
|
65
|
+
<br />
|
|
66
|
+
<a href="../files/lib/Context/Key_rb.html">
|
|
67
|
+
lib/Context/Key.rb
|
|
68
|
+
</a>
|
|
69
|
+
<br />
|
|
70
|
+
<a href="../files/lib/Context/View_rb.html">
|
|
71
|
+
lib/Context/View.rb
|
|
72
|
+
</a>
|
|
73
|
+
<br />
|
|
74
|
+
<a href="../files/lib/Context/Widget_rb.html">
|
|
75
|
+
lib/Context/Widget.rb
|
|
76
|
+
</a>
|
|
77
|
+
<br />
|
|
78
|
+
<a href="../files/lib/Context/Version_rb.html">
|
|
79
|
+
lib/Context/Version.rb
|
|
80
|
+
</a>
|
|
81
|
+
<br />
|
|
82
|
+
<a href="../files/lib/Context/KeyAssignment_rb.html">
|
|
83
|
+
lib/Context/KeyAssignment.rb
|
|
84
|
+
</a>
|
|
85
|
+
<br />
|
|
86
|
+
<a href="../files/lib/Context/KeyMap_rb.html">
|
|
87
|
+
lib/Context/KeyMap.rb
|
|
88
|
+
</a>
|
|
89
|
+
<br />
|
|
90
|
+
<a href="../files/lib/Context/Views/PageView_rb.html">
|
|
91
|
+
lib/Context/Views/PageView.rb
|
|
92
|
+
</a>
|
|
93
|
+
<br />
|
|
94
|
+
<a href="../files/lib/Context/ExecutionProxy_rb.html">
|
|
95
|
+
lib/Context/ExecutionProxy.rb
|
|
96
|
+
</a>
|
|
97
|
+
<br />
|
|
98
|
+
<a href="../files/lib/Context/Bridge_rb.html">
|
|
99
|
+
lib/Context/Bridge.rb
|
|
100
|
+
</a>
|
|
101
|
+
<br />
|
|
102
|
+
</td>
|
|
103
|
+
</tr>
|
|
104
|
+
|
|
105
|
+
</table>
|
|
106
|
+
</div>
|
|
107
|
+
<!-- banner header -->
|
|
108
|
+
|
|
109
|
+
<div id="bodyContent">
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
<div id="contextContent">
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<!-- if includes -->
|
|
124
|
+
|
|
125
|
+
<div id="section">
|
|
126
|
+
|
|
127
|
+
<div id="class-list">
|
|
128
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
|
129
|
+
|
|
130
|
+
Module <a href="Context/Gtk.html" class="link">Context::Gtk</a><br />
|
|
131
|
+
Class <a href="Context/Bridge.html" class="link">Context::Bridge</a><br />
|
|
132
|
+
Class <a href="Context/Context.html" class="link">Context::Context</a><br />
|
|
133
|
+
Class <a href="Context/EnumeratedType.html" class="link">Context::EnumeratedType</a><br />
|
|
134
|
+
Class <a href="Context/ExecutionProxy.html" class="link">Context::ExecutionProxy</a><br />
|
|
135
|
+
Class <a href="Context/Key.html" class="link">Context::Key</a><br />
|
|
136
|
+
Class <a href="Context/KeyAssignment.html" class="link">Context::KeyAssignment</a><br />
|
|
137
|
+
Class <a href="Context/KeyMap.html" class="link">Context::KeyMap</a><br />
|
|
138
|
+
Class <a href="Context/PageView.html" class="link">Context::PageView</a><br />
|
|
139
|
+
Class <a href="Context/View.html" class="link">Context::View</a><br />
|
|
140
|
+
Class <a href="Context/Widget.html" class="link">Context::Widget</a><br />
|
|
141
|
+
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<div id="constants-list">
|
|
145
|
+
<h3 class="section-bar">Constants</h3>
|
|
146
|
+
|
|
147
|
+
<div class="name-list">
|
|
148
|
+
<table summary="Constants">
|
|
149
|
+
<tr class="top-aligned-row context-row">
|
|
150
|
+
<td class="context-item-name">VERSION</td>
|
|
151
|
+
<td>=</td>
|
|
152
|
+
<td class="context-item-value">"0.0.16"</td>
|
|
153
|
+
</tr>
|
|
154
|
+
</table>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
<!-- if method_list -->
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<div id="validator-badges">
|
|
170
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
</body>
|
|
174
|
+
</html>
|
|
@@ -0,0 +1,296 @@
|
|
|
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::Bridge</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::Bridge</td>
|
|
54
|
+
</tr>
|
|
55
|
+
<tr class="top-aligned-row">
|
|
56
|
+
<td><strong>In:</strong></td>
|
|
57
|
+
<td>
|
|
58
|
+
<a href="../../files/lib/Context/Bridge_rb.html">
|
|
59
|
+
lib/Context/Bridge.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
|
+
This class is used to specify the namespace for a symbol according to a
|
|
86
|
+
priority list. When you create the <a href="Bridge.html">Bridge</a> you
|
|
87
|
+
initialize it either with a single module name, or an array of module
|
|
88
|
+
names. Calling "bridge.symbol" will return the class in desired
|
|
89
|
+
namespace (or nil if it doesn‘t exist) If the <a
|
|
90
|
+
href="Bridge.html">Bridge</a> was initialized with an array, it will pick
|
|
91
|
+
the first namespace that evaluates the symbol into something that actually
|
|
92
|
+
exists.
|
|
93
|
+
</p>
|
|
94
|
+
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div id="method-list">
|
|
101
|
+
<h3 class="section-bar">Methods</h3>
|
|
102
|
+
|
|
103
|
+
<div class="name-list">
|
|
104
|
+
<a href="#M000063">classExists?</a>
|
|
105
|
+
<a href="#M000062">evalClass</a>
|
|
106
|
+
<a href="#M000064">method_missing</a>
|
|
107
|
+
<a href="#M000060">new</a>
|
|
108
|
+
<a href="#M000061">symbolToS</a>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<!-- if includes -->
|
|
116
|
+
|
|
117
|
+
<div id="section">
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
<!-- if method_list -->
|
|
127
|
+
<div id="methods">
|
|
128
|
+
<h3 class="section-bar">Public Class methods</h3>
|
|
129
|
+
|
|
130
|
+
<div id="method-M000060" class="method-detail">
|
|
131
|
+
<a name="M000060"></a>
|
|
132
|
+
|
|
133
|
+
<div class="method-heading">
|
|
134
|
+
<a href="#M000060" class="method-signature">
|
|
135
|
+
<span class="method-name">new</span><span class="method-args">(mods)</span>
|
|
136
|
+
</a>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="method-description">
|
|
140
|
+
<p>
|
|
141
|
+
Takes either a module name, or an array of module names
|
|
142
|
+
</p>
|
|
143
|
+
<p><a class="source-toggle" href="#"
|
|
144
|
+
onclick="toggleCode('M000060-source');return false;">[Source]</a></p>
|
|
145
|
+
<div class="method-source-code" id="M000060-source">
|
|
146
|
+
<pre>
|
|
147
|
+
<span class="ruby-comment cmt"># File lib/Context/Bridge.rb, line 16</span>
|
|
148
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">mods</span>)
|
|
149
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mods</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">Array</span>
|
|
150
|
+
<span class="ruby-ivar">@mod</span> = <span class="ruby-identifier">mods</span>
|
|
151
|
+
<span class="ruby-ivar">@mods</span> = <span class="ruby-keyword kw">nil</span>
|
|
152
|
+
<span class="ruby-keyword kw">else</span>
|
|
153
|
+
<span class="ruby-ivar">@mods</span> = <span class="ruby-identifier">mods</span>
|
|
154
|
+
<span class="ruby-ivar">@mod</span> = <span class="ruby-keyword kw">nil</span>
|
|
155
|
+
<span class="ruby-keyword kw">end</span>
|
|
156
|
+
<span class="ruby-keyword kw">end</span>
|
|
157
|
+
</pre>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
|
163
|
+
|
|
164
|
+
<div id="method-M000063" class="method-detail">
|
|
165
|
+
<a name="M000063"></a>
|
|
166
|
+
|
|
167
|
+
<div class="method-heading">
|
|
168
|
+
<a href="#M000063" class="method-signature">
|
|
169
|
+
<span class="method-name">classExists?</span><span class="method-args">(mod, symbol)</span>
|
|
170
|
+
</a>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<div class="method-description">
|
|
174
|
+
<p>
|
|
175
|
+
Returns true if the mod and symbol evaluate to a class in the system.
|
|
176
|
+
</p>
|
|
177
|
+
<p><a class="source-toggle" href="#"
|
|
178
|
+
onclick="toggleCode('M000063-source');return false;">[Source]</a></p>
|
|
179
|
+
<div class="method-source-code" id="M000063-source">
|
|
180
|
+
<pre>
|
|
181
|
+
<span class="ruby-comment cmt"># File lib/Context/Bridge.rb, line 42</span>
|
|
182
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">classExists?</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">symbol</span>)
|
|
183
|
+
<span class="ruby-identifier">symbolToS</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">symbol</span>).<span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">evalClass</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">symbol</span>).<span class="ruby-identifier">to_s</span>)
|
|
184
|
+
<span class="ruby-keyword kw">end</span>
|
|
185
|
+
</pre>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
<div id="method-M000062" class="method-detail">
|
|
191
|
+
<a name="M000062"></a>
|
|
192
|
+
|
|
193
|
+
<div class="method-heading">
|
|
194
|
+
<a href="#M000062" class="method-signature">
|
|
195
|
+
<span class="method-name">evalClass</span><span class="method-args">(mod, symbol)</span>
|
|
196
|
+
</a>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<div class="method-description">
|
|
200
|
+
<p>
|
|
201
|
+
Evaluate the module and symbol, returning the class. If it doesn‘t
|
|
202
|
+
exist, return nil
|
|
203
|
+
</p>
|
|
204
|
+
<p><a class="source-toggle" href="#"
|
|
205
|
+
onclick="toggleCode('M000062-source');return false;">[Source]</a></p>
|
|
206
|
+
<div class="method-source-code" id="M000062-source">
|
|
207
|
+
<pre>
|
|
208
|
+
<span class="ruby-comment cmt"># File lib/Context/Bridge.rb, line 33</span>
|
|
209
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">evalClass</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">symbol</span>)
|
|
210
|
+
<span class="ruby-keyword kw">begin</span>
|
|
211
|
+
<span class="ruby-identifier">mod</span>.<span class="ruby-identifier">unless_nil</span> <span class="ruby-keyword kw">do</span> <span class="ruby-identifier">class_eval</span>(<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>) <span class="ruby-keyword kw">end</span>
|
|
212
|
+
<span class="ruby-keyword kw">rescue</span>
|
|
213
|
+
<span class="ruby-keyword kw">nil</span>
|
|
214
|
+
<span class="ruby-keyword kw">end</span>
|
|
215
|
+
<span class="ruby-keyword kw">end</span>
|
|
216
|
+
</pre>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
|
|
221
|
+
<div id="method-M000064" class="method-detail">
|
|
222
|
+
<a name="M000064"></a>
|
|
223
|
+
|
|
224
|
+
<div class="method-heading">
|
|
225
|
+
<a href="#M000064" class="method-signature">
|
|
226
|
+
<span class="method-name">method_missing</span><span class="method-args">(symbol)</span>
|
|
227
|
+
</a>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div class="method-description">
|
|
231
|
+
<p>
|
|
232
|
+
Return the class specified by the stored module and the symbol If an array
|
|
233
|
+
of modules was stored, walk through them and pick the first one that
|
|
234
|
+
creates an extant class.
|
|
235
|
+
</p>
|
|
236
|
+
<p><a class="source-toggle" href="#"
|
|
237
|
+
onclick="toggleCode('M000064-source');return false;">[Source]</a></p>
|
|
238
|
+
<div class="method-source-code" id="M000064-source">
|
|
239
|
+
<pre>
|
|
240
|
+
<span class="ruby-comment cmt"># File lib/Context/Bridge.rb, line 49</span>
|
|
241
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">symbol</span>)
|
|
242
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@mod</span>.<span class="ruby-identifier">nil?</span>
|
|
243
|
+
<span class="ruby-ivar">@mod</span>.<span class="ruby-identifier">class_eval</span>(<span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>)
|
|
244
|
+
<span class="ruby-keyword kw">elsif</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@mods</span>.<span class="ruby-identifier">nil?</span>
|
|
245
|
+
<span class="ruby-identifier">mod</span> = <span class="ruby-ivar">@mods</span>.<span class="ruby-identifier">find</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mod</span><span class="ruby-operator">|</span>
|
|
246
|
+
<span class="ruby-identifier">classExists?</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">symbol</span>)
|
|
247
|
+
<span class="ruby-keyword kw">end</span>
|
|
248
|
+
<span class="ruby-identifier">evalClass</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">symbol</span>)
|
|
249
|
+
<span class="ruby-keyword kw">else</span>
|
|
250
|
+
<span class="ruby-keyword kw">nil</span>
|
|
251
|
+
<span class="ruby-keyword kw">end</span>
|
|
252
|
+
<span class="ruby-keyword kw">end</span>
|
|
253
|
+
</pre>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div id="method-M000061" class="method-detail">
|
|
259
|
+
<a name="M000061"></a>
|
|
260
|
+
|
|
261
|
+
<div class="method-heading">
|
|
262
|
+
<a href="#M000061" class="method-signature">
|
|
263
|
+
<span class="method-name">symbolToS</span><span class="method-args">(mod, symbol)</span>
|
|
264
|
+
</a>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<div class="method-description">
|
|
268
|
+
<p>
|
|
269
|
+
Convert the module name and symbol to a string
|
|
270
|
+
</p>
|
|
271
|
+
<p><a class="source-toggle" href="#"
|
|
272
|
+
onclick="toggleCode('M000061-source');return false;">[Source]</a></p>
|
|
273
|
+
<div class="method-source-code" id="M000061-source">
|
|
274
|
+
<pre>
|
|
275
|
+
<span class="ruby-comment cmt"># File lib/Context/Bridge.rb, line 27</span>
|
|
276
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbolToS</span>(<span class="ruby-identifier">mod</span>, <span class="ruby-identifier">symbol</span>)
|
|
277
|
+
<span class="ruby-identifier">mod</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">"::"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">symbol</span>.<span class="ruby-identifier">to_s</span>
|
|
278
|
+
<span class="ruby-keyword kw">end</span>
|
|
279
|
+
</pre>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
</div>
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
<div id="validator-badges">
|
|
292
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
</body>
|
|
296
|
+
</html>
|