class TP::Slide::Paragraph

Public Instance Methods

hard_width?() click to toggle source
# File lib/tp/slide/paragraph.rb, line 34
def hard_width?
  false
end
paragraph() click to toggle source
# File lib/tp/slide/paragraph.rb, line 23
def paragraph
  buffer = content.wrap Screen.width
  buffer = buffer.center Screen.width if buffer.lines.one?

  buffer
end
render_pdf(pdf) click to toggle source
# File lib/tp/slide/paragraph.rb, line 2
def render_pdf(pdf)
  pdf.text_box header,
    align: :center,
    overflow: :shrink_to_fit,
    single_line: true,
    height: pdf_header_height,
    size: pdf_header_height

  pdf.text_box paragraph,
    at: pdf_content_top_left(pdf),
    height: pdf_content_height(pdf),
    overflow: :shrink_to_fit,
    valign: :center
end
render_terminal() click to toggle source
# File lib/tp/slide/paragraph.rb, line 17
def render_terminal
  centered_header +
    "\n\n" +
    paragraph
end
width() click to toggle source
# File lib/tp/slide/paragraph.rb, line 30
def width
  content.length
end