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

AssociationHash - alias #include? to #key? #907

Merged
merged 1 commit into from
Oct 16, 2015

Conversation

dchandekstark
Copy link
Member

No description provided.

@grosscol
Copy link
Member

I have no feelings on this one way or another. What use case brought this up?

@dchandekstark
Copy link
Member Author

@grosscol In pre-AF9, ActiveFedora::Base#datastreams returns a DatastreamHash (e.g., https://github.com/projecthydra/active_fedora/blob/v7.1.2/lib/active_fedora/datastream_hash.rb) which supports Hash instance methods (which includes include?). In AF9, this becomes a FilesHash, which is an AssociationHash. The continuity is nice, plus the names suggest that one might expect that method of Hash to work, and there seems to be no reason not to.

@jcoyne
Copy link
Member

jcoyne commented Oct 13, 2015

It looks like I removed the delegators here: ff7da65 At that commit we switched from wrapping a hash, to an API that mimics the Hash api, so it isn't complete. Feel free to add missing methods as you need them.

jcoyne added a commit that referenced this pull request Oct 16, 2015
AssociationHash - alias `#include?` to `#key?`
@jcoyne jcoyne merged commit cd209eb into samvera:master Oct 16, 2015
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.

4 participants