Method: Arrow::Template::Node#to_html

Defined in:
lib/arrow/template/nodes.rb

#to_htmlObject

Return an HTML fragment that can be used to represent the node symbolically in a web-based introspection interface.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/arrow/template/nodes.rb', line 84

def to_html
	content = nil

	if block_given? 
		content = yield
	else
		content = ""
	end

	nodeclass = self.css_class

	%q{<div class="node %s"><div class="node-head %s-head">%s</div>
		<div class="node-body %s-body">%s</div></div>} % [
		nodeclass, nodeclass,
		self.class.name.sub(/Arrow::Template::/, ''),
		nodeclass,
		content,
	]
end