Class: TraceViz::Defaults::Config
- Inherits:
-
Object
- Object
- TraceViz::Defaults::Config
- Defined in:
- lib/trace_viz/defaults/config.rb
Constant Summary collapse
- DEFAULTS =
{ general: { tab_size: 2, mode: :summary, # :summary, :verbose group_keys: [:event, :klass, :action], show_indent: true, show_depth: true, max_display_depth: 3, show_method_name: true, }, source_location: { show: false, truncate_length: 100, }, params: { show: true, mode: :name_and_value, truncate_values: 10, truncate_length: -1, }, result: { show: true, truncate_value: 50, truncate_length: 30, }, execution: { show_time: true, show_trace_events: [:call, :return], }, filters: [ :exclude_internal_call, # :exclude_default_classes, # :exclude_rails_framework, # include_classes: { # classes: [], # }, # exclude_classes: { # classes: [], # }, # include_gems: { # app_running: true, # app_path: Dir.pwd, # gems: [], # }, # exclude_gems: { # gems: [], # }, ], log: { enabled: true, runtime: false, post_collection: true, stats: true, }, export: { enabled: true, path: "tmp", format: :txt, overwrite: false, }, }.freeze
Class Method Summary collapse
- .fetch ⇒ Object
- .valid_export_format?(format) ⇒ Boolean
- .valid_export_formats ⇒ Object
- .valid_param_mode?(mode) ⇒ Boolean
- .valid_param_modes ⇒ Object
Class Method Details
.fetch ⇒ Object
69 70 71 |
# File 'lib/trace_viz/defaults/config.rb', line 69 def fetch DEFAULTS.dup end |
.valid_export_format?(format) ⇒ Boolean
85 86 87 |
# File 'lib/trace_viz/defaults/config.rb', line 85 def valid_export_format?(format) valid_export_formats.include?(format) end |
.valid_export_formats ⇒ Object
81 82 83 |
# File 'lib/trace_viz/defaults/config.rb', line 81 def valid_export_formats [:txt, :json, :yaml, :mermaid].freeze end |
.valid_param_mode?(mode) ⇒ Boolean
77 78 79 |
# File 'lib/trace_viz/defaults/config.rb', line 77 def valid_param_mode?(mode) valid_param_modes.include?(mode) end |
.valid_param_modes ⇒ Object
73 74 75 |
# File 'lib/trace_viz/defaults/config.rb', line 73 def valid_param_modes [:name_and_value, :name_only, :value_only].freeze end |