# frozen_string_literal: true require_relative "viz/version" require_relative "viz/html" require "stack_trace" require "erb" require "json" module StackTrace module Viz LAYOUT_FILE = "../public/main.html.erb" class << self def save_current!(file_path = nil, **extra) HTML.new(StackTrace.current, **extra).save(file_path) end def as_json JSON.generate({ description: "Generated by StackTrace::Viz", trace: StackTrace.current }) end end end end