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

Implement enumerable for has_content module #7

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

chadwilken
Copy link
Collaborator

@chadwilken chadwilken commented Nov 1, 2023

There are cases I am hitting where I need to use some enumerable methods while interacting with a HasContent class. In this case rather than implementing a bunch of custom methods I decided to include Enumerable and implement each, << and size. I think that should solve most of the use cases I am finding.

While I was in there I also refactored find_node to use Enumerable#find and allow a type name or class.

@chadwilken chadwilken merged commit 68d488a into master Nov 1, 2023
1 check passed
@chadwilken chadwilken deleted the make-content-enumerable branch November 1, 2023 14:49
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