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 tree_view from the arrange method #559

Closed
Bizcho opened this issue Nov 19, 2021 · 3 comments
Closed

implement tree_view from the arrange method #559

Bizcho opened this issue Nov 19, 2021 · 3 comments

Comments

@Bizcho
Copy link
Contributor

Bizcho commented Nov 19, 2021

A pretty print of the tree function.

TreeNode.arrange returns:

{
  #<TreeNode id: 100018, name: "Stinky", ancestry: nil> => {
    #<TreeNode id: 100019, name: "Crunchy", ancestry: "100018"> => {
      #<TreeNode id: 100020, name: "Squeeky", ancestry: "100018/100019"> => {}
    },
    #<TreeNode id: 100021, name: "Squishy", ancestry: "100018"> => {}
  }
}

TreeNode.tree_view(:name) should return:

"Stinky"
|---"Crunchy"
|----|----"Squeeky"
|---"Squishy"
@Bizcho
Copy link
Contributor Author

Bizcho commented Nov 22, 2021

I just made the pull request for this fix on the #560. Hope everithing is fine and you can add it to the repo

@kbrock
Copy link
Collaborator

kbrock commented Jan 5, 2022

all set

@kbrock kbrock closed this as completed Jan 5, 2022
@epugh
Copy link

epugh commented Mar 18, 2022

I was hoping to use this, but not quite understanding it.. ARe there any docs?

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

No branches or pull requests

3 participants