summaryrefslogtreecommitdiff
path: root/lib/rdoc/markup/heading.rb
blob: 21e2574d686be1b3acd29a339bff9582e2425f45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
##
# A heading with a level (1-6) and text

class RDoc::Markup::Heading < Struct.new :level, :text

  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