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

changeset 7273
391d6b7b1eff
parent 6942
2602857055c5
child 7693
a51f82458a1b
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.Utilities.ClassBrowsers.rbclbr</h1> 23 <h1>eric6.Utilities.ClassBrowsers.rbclbr</h1>
24
23 <p> 25 <p>
24 Parse a Ruby file and retrieve classes, modules, methods and attributes. 26 Parse a Ruby file and retrieve classes, modules, methods and attributes.
25 </p><p> 27 </p>
28 <p>
26 Parse enough of a Ruby file to recognize class, module and method definitions 29 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. 30 and to find out the superclasses of a class as well as its attributes.
28 </p><p> 31 </p>
32 <p>
29 It is based on the Python class browser found in this package. 33 It is based on the Python class browser found in this package.
30 </p> 34 </p>
31 <h3>Global Attributes</h3> 35 <h3>Global Attributes</h3>
36
32 <table> 37 <table>
33 <tr><td>SUPPORTED_TYPES</td></tr><tr><td>_commentsub</td></tr><tr><td>_getnext</td></tr><tr><td>_modules</td></tr> 38 <tr><td>SUPPORTED_TYPES</td></tr><tr><td>_commentsub</td></tr><tr><td>_getnext</td></tr><tr><td>_modules</td></tr>
34 </table> 39 </table>
35 <h3>Classes</h3> 40 <h3>Classes</h3>
36 <table> 41
42 <table>
43
37 <tr> 44 <tr>
38 <td><a href="#Attribute">Attribute</a></td> 45 <td><a href="#Attribute">Attribute</a></td>
39 <td>Class to represent a class or module attribute.</td> 46 <td>Class to represent a class or module attribute.</td>
40 </tr><tr> 47 </tr>
48 <tr>
41 <td><a href="#Class">Class</a></td> 49 <td><a href="#Class">Class</a></td>
42 <td>Class to represent a Ruby class.</td> 50 <td>Class to represent a Ruby class.</td>
43 </tr><tr> 51 </tr>
52 <tr>
44 <td><a href="#Function">Function</a></td> 53 <td><a href="#Function">Function</a></td>
45 <td>Class to represent a Ruby function.</td> 54 <td>Class to represent a Ruby function.</td>
46 </tr><tr> 55 </tr>
56 <tr>
47 <td><a href="#Module">Module</a></td> 57 <td><a href="#Module">Module</a></td>
48 <td>Class to represent a Ruby module.</td> 58 <td>Class to represent a Ruby module.</td>
49 </tr><tr> 59 </tr>
60 <tr>
50 <td><a href="#VisibilityMixin">VisibilityMixin</a></td> 61 <td><a href="#VisibilityMixin">VisibilityMixin</a></td>
51 <td>Mixin class implementing the notion of visibility.</td> 62 <td>Mixin class implementing the notion of visibility.</td>
52 </tr> 63 </tr>
53 </table> 64 </table>
54 <h3>Functions</h3> 65 <h3>Functions</h3>
55 <table> 66
67 <table>
68
56 <tr> 69 <tr>
57 <td><a href="#readmodule_ex">readmodule_ex</a></td> 70 <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> 71 <td>Read a Ruby file and return a dictionary of classes, functions and modules.</td>
59 </tr> 72 </tr>
60 </table> 73 </table>
61 <hr /><hr /> 74 <hr />
75 <hr />
62 <a NAME="Attribute" ID="Attribute"></a> 76 <a NAME="Attribute" ID="Attribute"></a>
63 <h2>Attribute</h2> 77 <h2>Attribute</h2>
78
64 <p> 79 <p>
65 Class to represent a class or module attribute. 80 Class to represent a class or module attribute.
66 </p> 81 </p>
67 <h3>Derived from</h3> 82 <h3>Derived from</h3>
68 ClbrBaseClasses.Attribute, VisibilityMixin 83 ClbrBaseClasses.Attribute, VisibilityMixin
69 <h3>Class Attributes</h3> 84 <h3>Class Attributes</h3>
85
70 <table> 86 <table>
71 <tr><td>None</td></tr> 87 <tr><td>None</td></tr>
72 </table> 88 </table>
73 <h3>Class Methods</h3> 89 <h3>Class Methods</h3>
90
74 <table> 91 <table>
75 <tr><td>None</td></tr> 92 <tr><td>None</td></tr>
76 </table> 93 </table>
77 <h3>Methods</h3> 94 <h3>Methods</h3>
78 <table> 95
96 <table>
97
79 <tr> 98 <tr>
80 <td><a href="#Attribute.__init__">Attribute</a></td> 99 <td><a href="#Attribute.__init__">Attribute</a></td>
81 <td>Constructor</td> 100 <td>Constructor</td>
82 </tr> 101 </tr>
83 </table> 102 </table>
84 <h3>Static Methods</h3> 103 <h3>Static Methods</h3>
85 <table> 104
86 <tr><td>None</td></tr> 105 <table>
87 </table> 106 <tr><td>None</td></tr>
107 </table>
108
88 <a NAME="Attribute.__init__" ID="Attribute.__init__"></a> 109 <a NAME="Attribute.__init__" ID="Attribute.__init__"></a>
89 <h4>Attribute (Constructor)</h4> 110 <h4>Attribute (Constructor)</h4>
90 <b>Attribute</b>(<i>module, name, file, lineno</i>) 111 <b>Attribute</b>(<i>module, name, file, lineno</i>)
112
91 <p> 113 <p>
92 Constructor 114 Constructor
93 </p><dl> 115 </p>
116 <dl>
117
94 <dt><i>module</i></dt> 118 <dt><i>module</i></dt>
95 <dd> 119 <dd>
96 name of the module containing this class 120 name of the module containing this class
97 </dd><dt><i>name</i></dt> 121 </dd>
122 <dt><i>name</i></dt>
98 <dd> 123 <dd>
99 name of this class 124 name of this class
100 </dd><dt><i>file</i></dt> 125 </dd>
126 <dt><i>file</i></dt>
101 <dd> 127 <dd>
102 filename containing this attribute 128 filename containing this attribute
103 </dd><dt><i>lineno</i></dt> 129 </dd>
130 <dt><i>lineno</i></dt>
104 <dd> 131 <dd>
105 linenumber of the class definition 132 linenumber of the class definition
106 </dd> 133 </dd>
107 </dl> 134 </dl>
108 <div align="right"><a href="#top">Up</a></div> 135 <div align="right"><a href="#top">Up</a></div>
109 <hr /><hr /> 136 <hr />
137 <hr />
110 <a NAME="Class" ID="Class"></a> 138 <a NAME="Class" ID="Class"></a>
111 <h2>Class</h2> 139 <h2>Class</h2>
140
112 <p> 141 <p>
113 Class to represent a Ruby class. 142 Class to represent a Ruby class.
114 </p> 143 </p>
115 <h3>Derived from</h3> 144 <h3>Derived from</h3>
116 ClbrBaseClasses.Class, VisibilityMixin 145 ClbrBaseClasses.Class, VisibilityMixin
117 <h3>Class Attributes</h3> 146 <h3>Class Attributes</h3>
147
118 <table> 148 <table>
119 <tr><td>None</td></tr> 149 <tr><td>None</td></tr>
120 </table> 150 </table>
121 <h3>Class Methods</h3> 151 <h3>Class Methods</h3>
152
122 <table> 153 <table>
123 <tr><td>None</td></tr> 154 <tr><td>None</td></tr>
124 </table> 155 </table>
125 <h3>Methods</h3> 156 <h3>Methods</h3>
126 <table> 157
158 <table>
159
127 <tr> 160 <tr>
128 <td><a href="#Class.__init__">Class</a></td> 161 <td><a href="#Class.__init__">Class</a></td>
129 <td>Constructor</td> 162 <td>Constructor</td>
130 </tr> 163 </tr>
131 </table> 164 </table>
132 <h3>Static Methods</h3> 165 <h3>Static Methods</h3>
133 <table> 166
134 <tr><td>None</td></tr> 167 <table>
135 </table> 168 <tr><td>None</td></tr>
169 </table>
170
136 <a NAME="Class.__init__" ID="Class.__init__"></a> 171 <a NAME="Class.__init__" ID="Class.__init__"></a>
137 <h4>Class (Constructor)</h4> 172 <h4>Class (Constructor)</h4>
138 <b>Class</b>(<i>module, name, superClasses, file, lineno</i>) 173 <b>Class</b>(<i>module, name, superClasses, file, lineno</i>)
174
139 <p> 175 <p>
140 Constructor 176 Constructor
141 </p><dl> 177 </p>
178 <dl>
179
142 <dt><i>module</i></dt> 180 <dt><i>module</i></dt>
143 <dd> 181 <dd>
144 name of the module containing this class 182 name of the module containing this class
145 </dd><dt><i>name</i></dt> 183 </dd>
184 <dt><i>name</i></dt>
146 <dd> 185 <dd>
147 name of this class 186 name of this class
148 </dd><dt><i>superClasses</i></dt> 187 </dd>
188 <dt><i>superClasses</i></dt>
149 <dd> 189 <dd>
150 list of class names this class is inherited from 190 list of class names this class is inherited from
151 </dd><dt><i>file</i></dt> 191 </dd>
192 <dt><i>file</i></dt>
152 <dd> 193 <dd>
153 filename containing this class 194 filename containing this class
154 </dd><dt><i>lineno</i></dt> 195 </dd>
196 <dt><i>lineno</i></dt>
155 <dd> 197 <dd>
156 linenumber of the class definition 198 linenumber of the class definition
157 </dd> 199 </dd>
158 </dl> 200 </dl>
159 <div align="right"><a href="#top">Up</a></div> 201 <div align="right"><a href="#top">Up</a></div>
160 <hr /><hr /> 202 <hr />
203 <hr />
161 <a NAME="Function" ID="Function"></a> 204 <a NAME="Function" ID="Function"></a>
162 <h2>Function</h2> 205 <h2>Function</h2>
206
163 <p> 207 <p>
164 Class to represent a Ruby function. 208 Class to represent a Ruby function.
165 </p> 209 </p>
166 <h3>Derived from</h3> 210 <h3>Derived from</h3>
167 ClbrBaseClasses.Function, VisibilityMixin 211 ClbrBaseClasses.Function, VisibilityMixin
168 <h3>Class Attributes</h3> 212 <h3>Class Attributes</h3>
213
169 <table> 214 <table>
170 <tr><td>None</td></tr> 215 <tr><td>None</td></tr>
171 </table> 216 </table>
172 <h3>Class Methods</h3> 217 <h3>Class Methods</h3>
218
173 <table> 219 <table>
174 <tr><td>None</td></tr> 220 <tr><td>None</td></tr>
175 </table> 221 </table>
176 <h3>Methods</h3> 222 <h3>Methods</h3>
177 <table> 223
224 <table>
225
178 <tr> 226 <tr>
179 <td><a href="#Function.__init__">Function</a></td> 227 <td><a href="#Function.__init__">Function</a></td>
180 <td>Constructor</td> 228 <td>Constructor</td>
181 </tr> 229 </tr>
182 </table> 230 </table>
183 <h3>Static Methods</h3> 231 <h3>Static Methods</h3>
184 <table> 232
185 <tr><td>None</td></tr> 233 <table>
186 </table> 234 <tr><td>None</td></tr>
235 </table>
236
187 <a NAME="Function.__init__" ID="Function.__init__"></a> 237 <a NAME="Function.__init__" ID="Function.__init__"></a>
188 <h4>Function (Constructor)</h4> 238 <h4>Function (Constructor)</h4>
189 <b>Function</b>(<i>module, name, file, lineno, signature='', separator=', '</i>) 239 <b>Function</b>(<i>module, name, file, lineno, signature='', separator=', '</i>)
240
190 <p> 241 <p>
191 Constructor 242 Constructor
192 </p><dl> 243 </p>
244 <dl>
245
193 <dt><i>module</i></dt> 246 <dt><i>module</i></dt>
194 <dd> 247 <dd>
195 name of the module containing this function 248 name of the module containing this function
196 </dd><dt><i>name</i></dt> 249 </dd>
250 <dt><i>name</i></dt>
197 <dd> 251 <dd>
198 name of this function 252 name of this function
199 </dd><dt><i>file</i></dt> 253 </dd>
254 <dt><i>file</i></dt>
200 <dd> 255 <dd>
201 filename containing this class 256 filename containing this class
202 </dd><dt><i>lineno</i></dt> 257 </dd>
258 <dt><i>lineno</i></dt>
203 <dd> 259 <dd>
204 linenumber of the class definition 260 linenumber of the class definition
205 </dd><dt><i>signature</i></dt> 261 </dd>
262 <dt><i>signature</i></dt>
206 <dd> 263 <dd>
207 parameterlist of the method 264 parameterlist of the method
208 </dd><dt><i>separator</i></dt> 265 </dd>
266 <dt><i>separator</i></dt>
209 <dd> 267 <dd>
210 string separating the parameters 268 string separating the parameters
211 </dd> 269 </dd>
212 </dl> 270 </dl>
213 <div align="right"><a href="#top">Up</a></div> 271 <div align="right"><a href="#top">Up</a></div>
214 <hr /><hr /> 272 <hr />
273 <hr />
215 <a NAME="Module" ID="Module"></a> 274 <a NAME="Module" ID="Module"></a>
216 <h2>Module</h2> 275 <h2>Module</h2>
276
217 <p> 277 <p>
218 Class to represent a Ruby module. 278 Class to represent a Ruby module.
219 </p> 279 </p>
220 <h3>Derived from</h3> 280 <h3>Derived from</h3>
221 ClbrBaseClasses.Module, VisibilityMixin 281 ClbrBaseClasses.Module, VisibilityMixin
222 <h3>Class Attributes</h3> 282 <h3>Class Attributes</h3>
283
223 <table> 284 <table>
224 <tr><td>None</td></tr> 285 <tr><td>None</td></tr>
225 </table> 286 </table>
226 <h3>Class Methods</h3> 287 <h3>Class Methods</h3>
288
227 <table> 289 <table>
228 <tr><td>None</td></tr> 290 <tr><td>None</td></tr>
229 </table> 291 </table>
230 <h3>Methods</h3> 292 <h3>Methods</h3>
231 <table> 293
294 <table>
295
232 <tr> 296 <tr>
233 <td><a href="#Module.__init__">Module</a></td> 297 <td><a href="#Module.__init__">Module</a></td>
234 <td>Constructor</td> 298 <td>Constructor</td>
235 </tr> 299 </tr>
236 </table> 300 </table>
237 <h3>Static Methods</h3> 301 <h3>Static Methods</h3>
238 <table> 302
239 <tr><td>None</td></tr> 303 <table>
240 </table> 304 <tr><td>None</td></tr>
305 </table>
306
241 <a NAME="Module.__init__" ID="Module.__init__"></a> 307 <a NAME="Module.__init__" ID="Module.__init__"></a>
242 <h4>Module (Constructor)</h4> 308 <h4>Module (Constructor)</h4>
243 <b>Module</b>(<i>module, name, file, lineno</i>) 309 <b>Module</b>(<i>module, name, file, lineno</i>)
310
244 <p> 311 <p>
245 Constructor 312 Constructor
246 </p><dl> 313 </p>
314 <dl>
315
247 <dt><i>module</i></dt> 316 <dt><i>module</i></dt>
248 <dd> 317 <dd>
249 name of the module containing this class 318 name of the module containing this class
250 </dd><dt><i>name</i></dt> 319 </dd>
320 <dt><i>name</i></dt>
251 <dd> 321 <dd>
252 name of this class 322 name of this class
253 </dd><dt><i>file</i></dt> 323 </dd>
324 <dt><i>file</i></dt>
254 <dd> 325 <dd>
255 filename containing this class 326 filename containing this class
256 </dd><dt><i>lineno</i></dt> 327 </dd>
328 <dt><i>lineno</i></dt>
257 <dd> 329 <dd>
258 linenumber of the class definition 330 linenumber of the class definition
259 </dd> 331 </dd>
260 </dl> 332 </dl>
261 <div align="right"><a href="#top">Up</a></div> 333 <div align="right"><a href="#top">Up</a></div>
262 <hr /><hr /> 334 <hr />
335 <hr />
263 <a NAME="VisibilityMixin" ID="VisibilityMixin"></a> 336 <a NAME="VisibilityMixin" ID="VisibilityMixin"></a>
264 <h2>VisibilityMixin</h2> 337 <h2>VisibilityMixin</h2>
338
265 <p> 339 <p>
266 Mixin class implementing the notion of visibility. 340 Mixin class implementing the notion of visibility.
267 </p> 341 </p>
268 <h3>Derived from</h3> 342 <h3>Derived from</h3>
269 ClbrBaseClasses.ClbrVisibilityMixinBase 343 ClbrBaseClasses.ClbrVisibilityMixinBase
270 <h3>Class Attributes</h3> 344 <h3>Class Attributes</h3>
345
271 <table> 346 <table>
272 <tr><td>None</td></tr> 347 <tr><td>None</td></tr>
273 </table> 348 </table>
274 <h3>Class Methods</h3> 349 <h3>Class Methods</h3>
350
275 <table> 351 <table>
276 <tr><td>None</td></tr> 352 <tr><td>None</td></tr>
277 </table> 353 </table>
278 <h3>Methods</h3> 354 <h3>Methods</h3>
279 <table> 355
356 <table>
357
280 <tr> 358 <tr>
281 <td><a href="#VisibilityMixin.__init__">VisibilityMixin</a></td> 359 <td><a href="#VisibilityMixin.__init__">VisibilityMixin</a></td>
282 <td>Constructor</td> 360 <td>Constructor</td>
283 </tr> 361 </tr>
284 </table> 362 </table>
285 <h3>Static Methods</h3> 363 <h3>Static Methods</h3>
286 <table> 364
287 <tr><td>None</td></tr> 365 <table>
288 </table> 366 <tr><td>None</td></tr>
367 </table>
368
289 <a NAME="VisibilityMixin.__init__" ID="VisibilityMixin.__init__"></a> 369 <a NAME="VisibilityMixin.__init__" ID="VisibilityMixin.__init__"></a>
290 <h4>VisibilityMixin (Constructor)</h4> 370 <h4>VisibilityMixin (Constructor)</h4>
291 <b>VisibilityMixin</b>(<i></i>) 371 <b>VisibilityMixin</b>(<i></i>)
372
292 <p> 373 <p>
293 Constructor 374 Constructor
294 </p> 375 </p>
295 <div align="right"><a href="#top">Up</a></div> 376 <div align="right"><a href="#top">Up</a></div>
296 <hr /><hr /> 377 <hr />
378 <hr />
297 <a NAME="readmodule_ex" ID="readmodule_ex"></a> 379 <a NAME="readmodule_ex" ID="readmodule_ex"></a>
298 <h2>readmodule_ex</h2> 380 <h2>readmodule_ex</h2>
299 <b>readmodule_ex</b>(<i>module, path=None</i>) 381 <b>readmodule_ex</b>(<i>module, path=None</i>)
382
300 <p> 383 <p>
301 Read a Ruby file and return a dictionary of classes, functions and modules. 384 Read a Ruby file and return a dictionary of classes, functions and modules.
302 </p><dl> 385 </p>
386 <dl>
387
303 <dt><i>module</i></dt> 388 <dt><i>module</i></dt>
304 <dd> 389 <dd>
305 name of the Ruby file (string) 390 name of the Ruby file (string)
306 </dd><dt><i>path</i></dt> 391 </dd>
392 <dt><i>path</i></dt>
307 <dd> 393 <dd>
308 path the file should be searched in (list of strings) 394 path the file should be searched in (list of strings)
309 </dd> 395 </dd>
310 </dl><dl> 396 </dl>
397 <dl>
311 <dt>Returns:</dt> 398 <dt>Returns:</dt>
312 <dd> 399 <dd>
313 the resulting dictionary 400 the resulting dictionary
314 </dd> 401 </dd>
315 </dl> 402 </dl>

eric ide

mercurial