blob: 081d6377292e8b92f6a8bde05458cf17e9df3870 (
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 +wisitor+
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
|