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

make VersionPresenterList an Enumerable; extract creation to factory #4975

Merged
merged 2 commits into from
May 25, 2021

Conversation

no-reply
Copy link
Contributor

VersionPresenterList is effectively an Enumerable (responds only to
#each), extending it with include Enumerable makes it more
versitile (perhaps we should consider a rename?). the current implementation
relies on loading each member up-front and then sorting, but this might not be
necessary for all backends. Enumerable also provides some guidance about how
to do this kind of loading lazily.

move the generation to a factory so the details of how to resolve an object to a
list of versions are encapsulated.

@samvera/hyrax-code-reviewers

`VersionPresenterList` is effectively an `Enumerable` (responds only to
`#each`), extending it with `include Enumerable` makes it more
versitile (perhaps we should consider a rename?). the current implementation
relies on loading each member up-front and then sorting, but this might not be
necessary for all backends. `Enumerable` also provides some guidance about how
to do this kind of loading lazily.

move the generation to a factory so the details of how to resolve an object to a
list of versions are encapsulated.
@jeremyf jeremyf merged commit b0c4de8 into main May 25, 2021
@jeremyf jeremyf deleted the version_list_factory branch May 25, 2021 15:11
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.

2 participants