Class: Dommy::Rack::Trace::Formatter::Text

Inherits:
Object
  • Object
show all
Defined in:
lib/dommy/rack/trace/formatter.rb

Overview

A readable, action-grouped timeline. Events belonging to an action are indented under its ACTION line.

Instance Method Summary collapse

Constructor Details

#initialize(events) ⇒ Text

Returns a new instance of Text.



13
14
15
# File 'lib/dommy/rack/trace/formatter.rb', line 13

def initialize(events)
  @events = events
end

Instance Method Details

#renderObject



17
18
19
# File 'lib/dommy/rack/trace/formatter.rb', line 17

def render
  @events.map { |event| line(event) }.join("\n")
end