Class: TomDoc::Generators::HTML
Instance Attribute Summary
#options, #scopes
Instance Method Summary
collapse
#constant?, #constant_names, generate, #generate, #initialize, #matches_pattern?, #process, #pygments, #valid?, #valid_tomdoc?, #write, #write_scope
Instance Method Details
#highlight(text) ⇒ Object
4
5
6
|
# File 'lib/tomdoc/generators/html.rb', line 4
def highlight(text)
pygments(text, '-l', 'ruby', '-f', 'html')
end
|
#write_class_methods(scope, prefix) ⇒ Object
15
16
17
18
19
|
# File 'lib/tomdoc/generators/html.rb', line 15
def write_class_methods(scope, prefix)
out = '<ul>'
out << super.join
write out
end
|
#write_instance_methods(scope, prefix) ⇒ Object
21
22
23
24
25
26
|
# File 'lib/tomdoc/generators/html.rb', line 21
def write_instance_methods(scope, prefix)
out = ''
out << super.join
out << '</ul>'
write out
end
|
#write_method(method, prefix = '') ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/tomdoc/generators/html.rb', line 28
def write_method(method, prefix = '')
if method.args.any?
args = '(' + method.args.join(', ') + ')'
end
out = '<li>'
out << "<b>#{prefix}#{method.to_s}#{args}</b>"
out << '<pre>'
out << method.tomdoc.tomdoc
out << '</pre>'
out << '</li>'
end
|
12
13
|
# File 'lib/tomdoc/generators/html.rb', line 12
def (scope, prefix)
end
|
8
9
10
|
# File 'lib/tomdoc/generators/html.rb', line 8
def (scope, prefix)
end
|