parameters: (self, env, modname, classname, name, type, searchorder=0)
return_statement: return newname, objects[newname]
docstring: Find a Ruby object for "name", perhaps using the given module and/or
          classname.
docstring_summary: Find a Ruby object for "name", perhaps using the given module and/or
          classname.
docstring_tokens: Find a Ruby object for name perhaps using the given module and / or classname .
function: def find_obj(self, env, modname, classname, name, type, searchorder=0):
          """
          Find a Ruby object for "name", perhaps using the given module and/or
          classname.
          """
          # skip parens
          if name[-2:] == '()':
              name = name[:-2]
  
          if not name:
              return None, None
  
          objects = self.data['objects']
  
          newname = None
          if searchorder == 1:
              if modname and classname and \
                       modname + '::' + classname + '#' + name in objects:
                  newname = modname + '::' + classname + '#' + name
              elif modname and classname and \
                       modname + '::' + classname + '.' + name in objects:
                  newname = modname + '::' + classname + '.' + name
              elif modname and modname + '::' + name in objects:
                  newname = modname + '::' + name
              elif modname and modname + '#' + name in objects:
                  newname = modname + '#' + name
              elif modname and modname + '.' + name in objects:
                  newname = modname + '.' + name
              elif classname and classname + '.' + name in objects:
                  newname = classname + '.' + name
              elif classname and classname + '#' + name in objects:
                  newname = classname + '#' + name
              elif name in objects:
                  newname = name
          else:
              if name in objects:
                  newname = name
              elif classname and classname + '.' + name in objects:
                  newname = classname + '.' + name
              elif classname and classname + '#' + name in objects:
                  newname = classname + '#' + name
              elif modname and modname + '::' + name in objects:
                  newname = modname + '::' + name
              elif modname and modname + '#' + name in objects:
                  newname = modname + '#' + name
              elif modname and modname + '.' + name in objects:
                  newname = modname + '.' + name
              elif modname and classname and \
                       modname + '::' + classname + '#' + name in objects:
                  newname = modname + '::' + classname + '#' + name
              elif modname and classname and \
                       modname + '::' + classname + '.' + name in objects:
                  newname = modname + '::' + classname + '.' + name
              # special case: object methods
              elif type in ('func', 'meth') and '.' not in name and \
                   'object.' + name in objects:
                  newname = 'object.' + name
          if newname is None:
              return None, None
          return newname, objects[newname]
function_tokens: def find_obj ( self , env , modname , classname , name , type , searchorder = 0 ) : # skip parens if name [ - 2 : ] == '()' : name = name [ : - 2 ] if not name : return None , None objects = self . data [ 'objects' ] newname = None if searchorder == 1 : if modname and classname and modname + '::' + classname + '#' + name in objects : newname = modname + '::' + classname + '#' + name elif modname and classname and modname + '::' + classname + '.' + name in objects : newname = modname + '::' + classname + '.' + name elif modname and modname + '::' + name in objects : newname = modname + '::' + name elif modname and modname + '#' + name in objects : newname = modname + '#' + name elif modname and modname + '.' + name in objects : newname = modname + '.' + name elif classname and classname + '.' + name in objects : newname = classname + '.' + name elif classname and classname + '#' + name in objects : newname = classname + '#' + name elif name in objects : newname = name else : if name in objects : newname = name elif classname and classname + '.' + name in objects : newname = classname + '.' + name elif classname and classname + '#' + name in objects : newname = classname + '#' + name elif modname and modname + '::' + name in objects : newname = modname + '::' + name elif modname and modname + '#' + name in objects : newname = modname + '#' + name elif modname and modname + '.' + name in objects : newname = modname + '.' + name elif modname and classname and modname + '::' + classname + '#' + name in objects : newname = modname + '::' + classname + '#' + name elif modname and classname and modname + '::' + classname + '.' + name in objects : newname = modname + '::' + classname + '.' + name # special case: object methods elif type in ( 'func' , 'meth' ) and '.' not in name and 'object.' + name in objects : newname = 'object.' + name if newname is None : return None , None return newname , objects [ newname ]