diff options
Diffstat (limited to 'lib/rdoc/markup/heading.rb')
-rw-r--r-- | lib/rdoc/markup/heading.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/rdoc/markup/heading.rb b/lib/rdoc/markup/heading.rb new file mode 100644 index 0000000000..21e2574d68 --- /dev/null +++ b/lib/rdoc/markup/heading.rb @@ -0,0 +1,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 + |