Module: TraceTree::TreeHtmlable

Includes:
TreeHtml
Included in:
Point
Defined in:
lib/trace_tree/tree_htmlable.rb

Constant Summary collapse

DEFAULT_JS =
['group_by_file'].map do |f|
  text = File.read File.expand_path("../#{f}.js", __FILE__)
  {text: text}
end

Instance Method Summary collapse

Instance Method Details

#body_js_for_tree_htmlObject



24
25
26
# File 'lib/trace_tree/tree_htmlable.rb', line 24

def body_js_for_tree_html
  DEFAULT_JS
end

#children_for_tree_htmlObject



28
29
30
# File 'lib/trace_tree/tree_htmlable.rb', line 28

def children_for_tree_html
  callees
end

#css_for_tree_htmlObject



32
33
34
# File 'lib/trace_tree/tree_htmlable.rb', line 32

def css_for_tree_html
  '.highlight{color: #a50000;}'
end

#data_for_tree_htmlObject



20
21
22
# File 'lib/trace_tree/tree_htmlable.rb', line 20

def data_for_tree_html
  {}
end

#label_for_tree_htmlObject



15
16
17
18
# File 'lib/trace_tree/tree_htmlable.rb', line 15

def label_for_tree_html
  "<span class='highlight'>#{CGI::escapeHTML class_and_method}</span> "\
    "#{CGI::escapeHTML source_location}"
end