Sha256: 649d9cb067b66149a1f2858e63cd58ab4127109d3db1950d0ad1d771cbb49413

Contents?: true

Size: 643 Bytes

Versions: 19

Compression:

Stored size: 643 Bytes

Contents

require 'tree_html'
require 'cgi'
require 'json'

class TraceTree
  module TreeHtmlable

    include TreeHtml

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

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

    def data_for_tree_html
      {}
    end

    def body_js_for_tree_html
      DEFAULT_JS
    end

    def children_for_tree_html
      callees
    end

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
trace_tree-0.3.6 lib/trace_tree/tree_htmlable.rb
trace_tree-0.3.5 lib/trace_tree/tree_htmlable.rb
trace_tree-0.3.4 lib/trace_tree/tree_htmlable.rb
trace_tree-0.3.3 lib/trace_tree/tree_htmlable.rb
trace_tree-0.3.2 lib/trace_tree/tree_htmlable.rb
trace_tree-0.3.1 lib/trace_tree/tree_htmlable.rb
trace_tree-0.3.0 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.23 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.22 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.21 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.20 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.19 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.18 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.17 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.16 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.15 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.14 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.13 lib/trace_tree/tree_htmlable.rb
trace_tree-0.2.12 lib/trace_tree/tree_htmlable.rb