Class: Tracia::DefaultLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/tracia/default_logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(out: STDOUT, html: false) ⇒ DefaultLogger

Returns a new instance of DefaultLogger.



3
4
5
6
# File 'lib/tracia/default_logger.rb', line 3

def initialize(out: STDOUT, html: false)
  @out = out
  @html = html
end

Instance Method Details

#call(root) ⇒ Object



8
9
10
11
# File 'lib/tracia/default_logger.rb', line 8

def call(root)
  content = @html ? root.tree_html_full : root.tree_graph
  @out.puts content
end