Class: StackTrace::Integrations::Presenters::HTML

Inherits:
Object
  • Object
show all
Defined in:
lib/stack_trace/integrations/presenters/html.rb

Constant Summary collapse

FINAL_MESSAGE =
<<~TEXT
  \e[1m
  StackTrace:

  Trace information is saved into \e[32m%<file_path>s\e[0m
  \e[22m
TEXT

Instance Method Summary collapse

Instance Method Details

#add(trace, **options) ⇒ Object



19
20
21
# File 'lib/stack_trace/integrations/presenters/html.rb', line 19

def add(trace, **options)
  html.add(trace, **options)
end

#save ⇒ Object



23
24
25
26
27
28
# File 'lib/stack_trace/integrations/presenters/html.rb', line 23

def save
  ensure_path_is_created!

  html.save(file_path)
      .then { |path| print_message(path) }
end