Class: Dommy::Rack::Trace::Formatter::Text
- Inherits:
-
Object
- Object
- Dommy::Rack::Trace::Formatter::Text
- 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
-
#initialize(events) ⇒ Text
constructor
A new instance of Text.
- #render ⇒ Object
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
#render ⇒ Object
17 18 19 |
# File 'lib/dommy/rack/trace/formatter.rb', line 17 def render @events.map { |event| line(event) }.join("\n") end |