rope.refactor.encapsulate_field

Classes

EncapsulateField

GetterSetterRenameInModule

Module Contents

class rope.refactor.encapsulate_field.EncapsulateField(project, resource, offset)
project
name
pyname
resource
get_changes(getter=None, setter=None, resources=None, task_handle=taskhandle.DEFAULT_TASK_HANDLE)

Get the changes this refactoring makes

If getter is not None, that will be the name of the getter, otherwise get_${field_name} will be used. The same is true for setter and if it is None set_${field_name} is used.

resources can be a list of rope.base.resource.File that the refactoring should be applied on; if None all python files in the project are searched.

get_field_name()

Get the name of the field to be encapsulated

class rope.refactor.encapsulate_field.GetterSetterRenameInModule(project, name, pyname, getter, setter)
project
name
finder
getter
setter
get_changed_module(resource=None, pymodule=None, skip_start=0, skip_end=0)