class ReverseAsciidoctor::Converters::Tr
Public Instance Methods
convert(node, state = {})
click to toggle source
# File lib/reverse_asciidoctor/converters/tr.rb, line 4 def convert(node, state = {}) content = treat_children(node, state).rstrip result = "#{content}\n" table_header_row?(node) ? result + underline_for(node) : result end
table_header_row?(node)
click to toggle source
# File lib/reverse_asciidoctor/converters/tr.rb, line 10 def table_header_row?(node) # node.element_children.all? {|child| child.name.to_sym == :th} node.previous_element.nil? end
underline_for(node)
click to toggle source
# File lib/reverse_asciidoctor/converters/tr.rb, line 15 def underline_for(node) "\n" end