Skip to content

Decorator implementation conflicts with Draper #138

Closed
@betamatt

Description

@betamatt

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions