Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vistual_call

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vistual_call

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

VistualCall

VistualCall is a gem to help you trace your code and export beautiful vistual call graph.

Introduction

Dependency

  1. Graphviz

You need to install Graphviz by yourself.

Go to install graphviz.

Usage

1. Install gem

gem install vistual_call

2. Only the method needs to be wrapped.

require 'vistual_call'

def call_c
end

def call_b
  call_c
end

def call_a
  call_b
end

VistualCall.trace do
  call_a # enter call
end

example

The method after each node is call order number. This will help your understand the order of the function call.

3. More information

configuration

# you can pass options
VistualCall.trace(options) do
  # run your code here...
end

Options:

nametyperequiredexplainexample
labelStringtrue标题Hello
labellocSymbolfalse标题位置: :top :bottom :center:top
labeljustSymbolfalse标题对齐位置 :left, :center, :right:center
directionSymbolfalse绘制方向,依次是 :TB(从上到下),:LR(从左到右,默认方式),:BT(从下到上),:RL(从右到左):LR
formatStringfalse输出图片格式,查看 graphviz 支持输出格式 'png'、'svg'默认 'png'
outputStringfalse导出图片绝对路径默认家目录下 vistual_call_result.png
themeSymbolfalse配色主题 :sky, :lemon默认 :sky
show_dotbooleanfalse展示 dot 内容默认 false
show_order_numberbooleanfalse输出调用序号默认 true
jump_listArray(String)false跳过节点,默认 ["Kernel#class", "Kernel#frozen?"]-
heightlight_matchRegexfalse默认高亮匹配 label, 默认 /method_missing//method_missing/

LICENSE

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 24 Apr 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc