Class: ReverseAsciidoctor::Converters::Tr
- Inherits:
-
Base
- Object
- Base
- ReverseAsciidoctor::Converters::Tr
show all
- Defined in:
- lib/reverse_asciidoctor/converters/tr.rb
Instance Method Summary
collapse
Methods inherited from Base
#escape_keychars, #extract_title, #treat, #treat_children
Instance Method Details
#convert(node, state = {}) ⇒ Object
4
5
6
7
8
|
# File 'lib/reverse_asciidoctor/converters/tr.rb', line 4
def convert(node, state = {})
content = treat_children(node, state).rstrip
result = "#{content}\n"
(node) ? result + underline_for(node) : result
end
|
10
11
12
13
|
# File 'lib/reverse_asciidoctor/converters/tr.rb', line 10
def (node)
node.previous_element.nil?
end
|
#underline_for(node) ⇒ Object
15
16
17
|
# File 'lib/reverse_asciidoctor/converters/tr.rb', line 15
def underline_for(node)
"\n"
end
|