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

Added instance methods to determine the relationship between 2 nodes #314

Merged
merged 2 commits into from
Jun 9, 2018

Conversation

r4do
Copy link
Contributor

@r4do r4do commented Jun 6, 2018

Added methods parent_of?, root_of?, ancestor_of?, descendant_of?, child_of? for checking relationship between nodes

@mceachen
Copy link
Collaborator

mceachen commented Jun 6, 2018

Thanks for the PR! Please add tests.

(In this case the diff is very straightforward, and I'm not worried about correctness, but tests prevent subsequent changes from breaking this functionality in the future).

@r4do
Copy link
Contributor Author

r4do commented Jun 8, 2018

@mceachen I've added tests, please check.

@mceachen mceachen merged commit 52531f5 into ClosureTree:master Jun 9, 2018
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