Retrieves an objects public methods :param instance: The instance of the class to inspect :rtype: dict :returns: A dictionary that represents an instance's methods where the keys are the name of the methods and the values are the handler to the method.
(instance)
| 26 | |
| 27 | |
| 28 | def get_instance_public_methods(instance): |
| 29 | """Retrieves an objects public methods |
| 30 | |
| 31 | :param instance: The instance of the class to inspect |
| 32 | :rtype: dict |
| 33 | :returns: A dictionary that represents an instance's methods where |
| 34 | the keys are the name of the methods and the |
| 35 | values are the handler to the method. |
| 36 | """ |
| 37 | instance_members = inspect.getmembers(instance) |
| 38 | instance_methods = {} |
| 39 | for name, member in instance_members: |
| 40 | if not name.startswith('_'): |
| 41 | if inspect.ismethod(member): |
| 42 | instance_methods[name] = member |
| 43 | return instance_methods |
| 44 | |
| 45 | |
| 46 | def document_model_driven_signature( |
no outgoing calls