Closed
Description
Both implementations define decorate
.
It seems that Contract's decorators are intended only for internal consumption and could be hidden away. One strategy is to have a single "engine" variable which is composed onto a class. The engine contains all data and methods required by Contracts and effectively provides a namespace, preventing any instance variables and methods from conflicting with those defined by the class. All functionality is accessed through the engine instance which contains a reference to the owning class such that object.decorate
becomes object.contracts.decorate
.
Metadata
Metadata
Assignees
Labels
No labels