class HTMLRenderer::Text
Strips out everything but the plain text.
Public Instance Methods
div(text)
click to toggle source
# File lib/html-renderer/text.rb, line 41 def div(text) text + "\n" end
header(text, header_level)
click to toggle source
# File lib/html-renderer/text.rb, line 53 def header(text, header_level) text + "\n" end
image(link, title, content)
click to toggle source
# File lib/html-renderer/text.rb, line 36 def image(link, title, content) content &&= content + " " "#{content}#{link}" end
link(link, title, content)
click to toggle source
Other methods where we don't return only a specific argument
# File lib/html-renderer/text.rb, line 32 def link(link, title, content) "#{content} (#{link})" end
paragraph(text)
click to toggle source
# File lib/html-renderer/text.rb, line 45 def paragraph(text) div(text) + "\n" end
separator()
click to toggle source
# File lib/html-renderer/text.rb, line 49 def separator "______________________\n\n" end
table(header, body)
click to toggle source
# File lib/html-renderer/text.rb, line 57 def table(header, body) "#{header}#{body}" end
table_cell(content, alignment)
click to toggle source
# File lib/html-renderer/text.rb, line 65 def table_cell(content, alignment) content + "\t" end
table_row(content)
click to toggle source
# File lib/html-renderer/text.rb, line 61 def table_row(content) content + "\n" end