Class: PDFConverterTableRole

Inherits:
Object
  • Object
show all
Defined in:
lib/asciidoctor/autoterm/table_roles.rb

Overview

Instance Method Summary collapse

Instance Method Details

#convert_table(node) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/asciidoctor/autoterm/table_roles.rb', line 6

def convert_table node
  if node.role?
    key_prefix = %(role_<table>_#{node.roles[0]}_)
    unless (role_entries = theme.each_pair.select {|name, val| name.to_s.start_with? key_prefix }).empty?
      save_theme do
        role_entries.each do |name, val|
          theme[%(table_#{name.to_s.delete_prefix key_prefix})] = val
        end
        super
      end
      return
    end
  end
  super
end