eric6/Documentation/Source/eric6.Utilities.ClassBrowsers.rbclbr.html

branch
maintenance
changeset 6989
8b8cadf8d7e9
parent 6942
2602857055c5
child 7273
391d6b7b1eff
equal deleted inserted replaced
6938:7926553b7509 6989:8b8cadf8d7e9
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Utilities.ClassBrowsers.rbclbr</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.Utilities.ClassBrowsers.rbclbr</h1>
23 <p>
24 Parse a Ruby file and retrieve classes, modules, methods and attributes.
25 </p><p>
26 Parse enough of a Ruby file to recognize class, module and method definitions
27 and to find out the superclasses of a class as well as its attributes.
28 </p><p>
29 It is based on the Python class browser found in this package.
30 </p>
31 <h3>Global Attributes</h3>
32 <table>
33 <tr><td>SUPPORTED_TYPES</td></tr><tr><td>_commentsub</td></tr><tr><td>_getnext</td></tr><tr><td>_modules</td></tr>
34 </table>
35 <h3>Classes</h3>
36 <table>
37 <tr>
38 <td><a href="#Attribute">Attribute</a></td>
39 <td>Class to represent a class or module attribute.</td>
40 </tr><tr>
41 <td><a href="#Class">Class</a></td>
42 <td>Class to represent a Ruby class.</td>
43 </tr><tr>
44 <td><a href="#Function">Function</a></td>
45 <td>Class to represent a Ruby function.</td>
46 </tr><tr>
47 <td><a href="#Module">Module</a></td>
48 <td>Class to represent a Ruby module.</td>
49 </tr><tr>
50 <td><a href="#VisibilityMixin">VisibilityMixin</a></td>
51 <td>Mixin class implementing the notion of visibility.</td>
52 </tr>
53 </table>
54 <h3>Functions</h3>
55 <table>
56 <tr>
57 <td><a href="#readmodule_ex">readmodule_ex</a></td>
58 <td>Read a Ruby file and return a dictionary of classes, functions and modules.</td>
59 </tr>
60 </table>
61 <hr /><hr />
62 <a NAME="Attribute" ID="Attribute"></a>
63 <h2>Attribute</h2>
64 <p>
65 Class to represent a class or module attribute.
66 </p>
67 <h3>Derived from</h3>
68 ClbrBaseClasses.Attribute, VisibilityMixin
69 <h3>Class Attributes</h3>
70 <table>
71 <tr><td>None</td></tr>
72 </table>
73 <h3>Class Methods</h3>
74 <table>
75 <tr><td>None</td></tr>
76 </table>
77 <h3>Methods</h3>
78 <table>
79 <tr>
80 <td><a href="#Attribute.__init__">Attribute</a></td>
81 <td>Constructor</td>
82 </tr>
83 </table>
84 <h3>Static Methods</h3>
85 <table>
86 <tr><td>None</td></tr>
87 </table>
88 <a NAME="Attribute.__init__" ID="Attribute.__init__"></a>
89 <h4>Attribute (Constructor)</h4>
90 <b>Attribute</b>(<i>module, name, file, lineno</i>)
91 <p>
92 Constructor
93 </p><dl>
94 <dt><i>module</i></dt>
95 <dd>
96 name of the module containing this class
97 </dd><dt><i>name</i></dt>
98 <dd>
99 name of this class
100 </dd><dt><i>file</i></dt>
101 <dd>
102 filename containing this attribute
103 </dd><dt><i>lineno</i></dt>
104 <dd>
105 linenumber of the class definition
106 </dd>
107 </dl>
108 <div align="right"><a href="#top">Up</a></div>
109 <hr /><hr />
110 <a NAME="Class" ID="Class"></a>
111 <h2>Class</h2>
112 <p>
113 Class to represent a Ruby class.
114 </p>
115 <h3>Derived from</h3>
116 ClbrBaseClasses.Class, VisibilityMixin
117 <h3>Class Attributes</h3>
118 <table>
119 <tr><td>None</td></tr>
120 </table>
121 <h3>Class Methods</h3>
122 <table>
123 <tr><td>None</td></tr>
124 </table>
125 <h3>Methods</h3>
126 <table>
127 <tr>
128 <td><a href="#Class.__init__">Class</a></td>
129 <td>Constructor</td>
130 </tr>
131 </table>
132 <h3>Static Methods</h3>
133 <table>
134 <tr><td>None</td></tr>
135 </table>
136 <a NAME="Class.__init__" ID="Class.__init__"></a>
137 <h4>Class (Constructor)</h4>
138 <b>Class</b>(<i>module, name, superClasses, file, lineno</i>)
139 <p>
140 Constructor
141 </p><dl>
142 <dt><i>module</i></dt>
143 <dd>
144 name of the module containing this class
145 </dd><dt><i>name</i></dt>
146 <dd>
147 name of this class
148 </dd><dt><i>superClasses</i></dt>
149 <dd>
150 list of class names this class is inherited from
151 </dd><dt><i>file</i></dt>
152 <dd>
153 filename containing this class
154 </dd><dt><i>lineno</i></dt>
155 <dd>
156 linenumber of the class definition
157 </dd>
158 </dl>
159 <div align="right"><a href="#top">Up</a></div>
160 <hr /><hr />
161 <a NAME="Function" ID="Function"></a>
162 <h2>Function</h2>
163 <p>
164 Class to represent a Ruby function.
165 </p>
166 <h3>Derived from</h3>
167 ClbrBaseClasses.Function, VisibilityMixin
168 <h3>Class Attributes</h3>
169 <table>
170 <tr><td>None</td></tr>
171 </table>
172 <h3>Class Methods</h3>
173 <table>
174 <tr><td>None</td></tr>
175 </table>
176 <h3>Methods</h3>
177 <table>
178 <tr>
179 <td><a href="#Function.__init__">Function</a></td>
180 <td>Constructor</td>
181 </tr>
182 </table>
183 <h3>Static Methods</h3>
184 <table>
185 <tr><td>None</td></tr>
186 </table>
187 <a NAME="Function.__init__" ID="Function.__init__"></a>
188 <h4>Function (Constructor)</h4>
189 <b>Function</b>(<i>module, name, file, lineno, signature='', separator=', '</i>)
190 <p>
191 Constructor
192 </p><dl>
193 <dt><i>module</i></dt>
194 <dd>
195 name of the module containing this function
196 </dd><dt><i>name</i></dt>
197 <dd>
198 name of this function
199 </dd><dt><i>file</i></dt>
200 <dd>
201 filename containing this class
202 </dd><dt><i>lineno</i></dt>
203 <dd>
204 linenumber of the class definition
205 </dd><dt><i>signature</i></dt>
206 <dd>
207 parameterlist of the method
208 </dd><dt><i>separator</i></dt>
209 <dd>
210 string separating the parameters
211 </dd>
212 </dl>
213 <div align="right"><a href="#top">Up</a></div>
214 <hr /><hr />
215 <a NAME="Module" ID="Module"></a>
216 <h2>Module</h2>
217 <p>
218 Class to represent a Ruby module.
219 </p>
220 <h3>Derived from</h3>
221 ClbrBaseClasses.Module, VisibilityMixin
222 <h3>Class Attributes</h3>
223 <table>
224 <tr><td>None</td></tr>
225 </table>
226 <h3>Class Methods</h3>
227 <table>
228 <tr><td>None</td></tr>
229 </table>
230 <h3>Methods</h3>
231 <table>
232 <tr>
233 <td><a href="#Module.__init__">Module</a></td>
234 <td>Constructor</td>
235 </tr>
236 </table>
237 <h3>Static Methods</h3>
238 <table>
239 <tr><td>None</td></tr>
240 </table>
241 <a NAME="Module.__init__" ID="Module.__init__"></a>
242 <h4>Module (Constructor)</h4>
243 <b>Module</b>(<i>module, name, file, lineno</i>)
244 <p>
245 Constructor
246 </p><dl>
247 <dt><i>module</i></dt>
248 <dd>
249 name of the module containing this class
250 </dd><dt><i>name</i></dt>
251 <dd>
252 name of this class
253 </dd><dt><i>file</i></dt>
254 <dd>
255 filename containing this class
256 </dd><dt><i>lineno</i></dt>
257 <dd>
258 linenumber of the class definition
259 </dd>
260 </dl>
261 <div align="right"><a href="#top">Up</a></div>
262 <hr /><hr />
263 <a NAME="VisibilityMixin" ID="VisibilityMixin"></a>
264 <h2>VisibilityMixin</h2>
265 <p>
266 Mixin class implementing the notion of visibility.
267 </p>
268 <h3>Derived from</h3>
269 ClbrBaseClasses.ClbrVisibilityMixinBase
270 <h3>Class Attributes</h3>
271 <table>
272 <tr><td>None</td></tr>
273 </table>
274 <h3>Class Methods</h3>
275 <table>
276 <tr><td>None</td></tr>
277 </table>
278 <h3>Methods</h3>
279 <table>
280 <tr>
281 <td><a href="#VisibilityMixin.__init__">VisibilityMixin</a></td>
282 <td>Constructor</td>
283 </tr>
284 </table>
285 <h3>Static Methods</h3>
286 <table>
287 <tr><td>None</td></tr>
288 </table>
289 <a NAME="VisibilityMixin.__init__" ID="VisibilityMixin.__init__"></a>
290 <h4>VisibilityMixin (Constructor)</h4>
291 <b>VisibilityMixin</b>(<i></i>)
292 <p>
293 Constructor
294 </p>
295 <div align="right"><a href="#top">Up</a></div>
296 <hr /><hr />
297 <a NAME="readmodule_ex" ID="readmodule_ex"></a>
298 <h2>readmodule_ex</h2>
299 <b>readmodule_ex</b>(<i>module, path=None</i>)
300 <p>
301 Read a Ruby file and return a dictionary of classes, functions and modules.
302 </p><dl>
303 <dt><i>module</i></dt>
304 <dd>
305 name of the Ruby file (string)
306 </dd><dt><i>path</i></dt>
307 <dd>
308 path the file should be searched in (list of strings)
309 </dd>
310 </dl><dl>
311 <dt>Returns:</dt>
312 <dd>
313 the resulting dictionary
314 </dd>
315 </dl>
316 <div align="right"><a href="#top">Up</a></div>
317 <hr />
318 </body></html>

eric ide

mercurial