Module: Recursivar::Formats::Html

Includes:
TreeHtml
Defined in:
lib/recursivar/formats.rb

Instance Method Summary collapse

Instance Method Details

#children_for_tree_htmlObject



60
61
62
# File 'lib/recursivar/formats.rb', line 60

def children_for_tree_html
  vars
end

#css_for_tree_htmlObject



64
65
66
# File 'lib/recursivar/formats.rb', line 64

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

#label_for_tree_htmlObject



54
55
56
57
58
# File 'lib/recursivar/formats.rb', line 54

def label_for_tree_html
  label = "<span class='highlight'>#{name}</span> #{klass}"
  return label unless ref
  "#{label} <span class='highlight'>#{CGI::escapeHTML ref.location_str}</span>"
end

#to_sObject



68
69
70
# File 'lib/recursivar/formats.rb', line 68

def to_s
  tree_html_full
end