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

Presenter view context #4

Merged
merged 8 commits into from
Apr 15, 2016
Merged

Presenter view context #4

merged 8 commits into from
Apr 15, 2016

Conversation

tombeynon
Copy link
Owner

This exposes the presenter's public methods to the view context used when rendering the component, instead of just setting the local variables when rendering. This allows for use of any method, a la 'helper methods', which is a lot more flexible than a hash of variables.

It does this by adding delegators on the view context for each of the presenter's public methods. To facilitate this it also defines readers for the properties set against the component class, which is useful when defining other methods for the component.

I think this works a lot better than my previous implementation, but I'm very open to any comments!

@tombeynon tombeynon merged commit ccf19f6 into presenters Apr 15, 2016
@tombeynon tombeynon deleted the presenter-rendering branch April 15, 2016 08:35
tombeynon added a commit that referenced this pull request Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant