diff options
author | Hiroshi SHIBATA <[email protected]> | 2025-01-15 11:52:40 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-01-15 16:52:56 +0900 |
commit | 86d871d29cda15810d9d60dc1b94a07e9530e0cb (patch) | |
tree | ae0fd977690197a4c82eed861527c109caade4f1 /lib/rdoc/markup/table.rb | |
parent | e0be1b902549f80fcdc95e801d4d533b0fdec43b (diff) |
Migrate rdoc as bundled gems
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12577
Diffstat (limited to 'lib/rdoc/markup/table.rb')
-rw-r--r-- | lib/rdoc/markup/table.rb | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/lib/rdoc/markup/table.rb b/lib/rdoc/markup/table.rb deleted file mode 100644 index 27a20f073a..0000000000 --- a/lib/rdoc/markup/table.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -## -# A section of table - -class RDoc::Markup::Table - # headers of each column - attr_accessor :header - - # alignments of each column - attr_accessor :align - - # body texts of each column - attr_accessor :body - - # Creates new instance - def initialize header, align, body - @header, @align, @body = header, align, body - end - - # :stopdoc: - def == other - self.class == other.class and - @header == other.header and - @align == other.align and - @body == other.body - end - - def accept visitor - visitor.accept_table @header, @body, @align - end - - def pretty_print q - 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 -end |