Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor away the Feature object #11

Closed
young-steveo opened this issue Jan 21, 2015 · 0 comments
Closed

Refactor away the Feature object #11

young-steveo opened this issue Jan 21, 2015 · 0 comments

Comments

@young-steveo
Copy link
Contributor

After a few rewrites of the code, the Feature class has become superfluous.

How it works now:

  1. Feature\Builder accepts and manages Behavior objects.
  2. When Feature\Builder::execute is called, it attaches the correct Behavior to a new Feature object, then calls Feature::execute.
  3. Feature::execute simply delegates to Behavior::execute.

Since the Feature class doesn't really do anything else, it stands to reason that Feature\Builder::execute could just delegate to the correct Behavior::execute method directly, rather than using Feature as a proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant