Socket
Book a DemoInstallSign in
Socket

tree_graph

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree_graph

0.2.4
bundlerRubygems
Version published
Maintainers
1
Created
Source

TreeGraph

A mixin to help you generate tree graph.

Installation

Add this line to your application's Gemfile:

gem 'tree_graph'

And then execute:

$ bundle

Or install it yourself as:

$ gem install tree_graph

Usage

In Node class, include TreeGraph, then implement two methods, label_for_tree_graph and children_for_tree_graph(which return thing responds to each). Then you can call tree_graph, tree_graph_bottom_up and tree_graph_bottom_up_in_same_order on that Node object.

By default, ::Object#label_for_tree_graph call to_s, and ::Object#children_for_tree_graph return empty array.

Or checkout test/tree_graph_test.rb to see how to use.

Gems depending on tree_graph: constree, trace_tree.

FAQs

Package last updated on 21 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.