Class: RDoc::Markup::Table
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rdoc/markup/table.rb |
Overview
A section of table
Class Method Summary
- .new(header, align, body) ⇒ Table constructor
Instance Attribute Summary
Instance Method Summary
- #==(other)
- #accept(visitor)
- #pretty_print(q) Internal use only
Constructor Details
.new(header, align, body) ⇒ Table
Instance Attribute Details
#align (rw)
[ GitHub ]#body (rw)
[ GitHub ]#header (rw)
[ GitHub ]Instance Method Details
#==(other)
[ GitHub ]#accept(visitor)
[ GitHub ]# File 'lib/rdoc/markup/table.rb', line 19
def accept visitor visitor.accept_table @header, @body, @align end
#pretty_print(q)
This method is for internal use only.
[ GitHub ]
# File 'lib/rdoc/markup/table.rb', line 23
def pretty_print q # :nodoc: q.group 2, '[Table: ', ']' do q.group 2, '[Head: ', ']' do q.seplist @header.zip(@align) do |text, align| q.pp text if align q.text ":" q.breakable q.text align.to_s end end end q.breakable q.group 2, '[Body: ', ']' do q.seplist @body do |body| q.group 2, '[', ']' do q.seplist body do |text| q.pp text end end end end end end