249 ClbrBaseClasses.Attribute.__init__(self, module, name, file, lineno) |
249 ClbrBaseClasses.Attribute.__init__(self, module, name, file, lineno) |
250 VisibilityMixin.__init__(self) |
250 VisibilityMixin.__init__(self) |
251 self.setPrivate() |
251 self.setPrivate() |
252 |
252 |
253 |
253 |
254 def readmodule_ex(module, path=[]): |
254 def readmodule_ex(module, path=None): |
255 """ |
255 """ |
256 Read a Ruby file and return a dictionary of classes, functions and modules. |
256 Read a Ruby file and return a dictionary of classes, functions and modules. |
257 |
257 |
258 @param module name of the Ruby file (string) |
258 @param module name of the Ruby file (string) |
259 @param path path the file should be searched in (list of strings) |
259 @param path path the file should be searched in (list of strings) |
268 # we've seen this file before... |
268 # we've seen this file before... |
269 return _modules[module] |
269 return _modules[module] |
270 |
270 |
271 # search the path for the file |
271 # search the path for the file |
272 f = None |
272 f = None |
273 fullpath = list(path) |
273 fullpath = [] if path is None else path[:] |
274 f, file, (suff, mode, type) = ClassBrowsers.find_module(module, fullpath) |
274 f, file, (suff, mode, type) = ClassBrowsers.find_module(module, fullpath) |
275 if f: |
275 if f: |
276 f.close() |
276 f.close() |
277 if type not in SUPPORTED_TYPES: |
277 if type not in SUPPORTED_TYPES: |
278 # not Ruby source, can't do anything with this module |
278 # not Ruby source, can't do anything with this module |