blob: 3bda77a1e12528e97740db48382c2f594a8088a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
##
# A heading with a level (1-6) and text
class RDoc::Markup::Heading < Struct.new :level, :text
##
# Calls #accept_heading on +visitor+
def accept visitor
visitor.accept_heading self
end
def pretty_print q # :nodoc:
q.group 2, "[head: #{level} ", ']' do
q.pp text
end
end
end
|