Class: TP::Slide::HeaderOnly

Inherits:
TP::Slide show all
Defined in:
lib/tp/slide/header_only.rb

Instance Attribute Summary

Attributes inherited from TP::Slide

#markdown

Instance Method Summary collapse

Methods inherited from TP::Slide

#centered_header, #content, #frames, #hard_width?, #header, #height, #initialize, #lines, #pdf_content_height, #pdf_content_top_left, #pdf_header_height

Constructor Details

This class inherits a constructor from TP::Slide

Instance Method Details

#render_pdf(pdf) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/tp/slide/header_only.rb', line 2

def render_pdf(pdf)
  pdf.text_box header,
    align: :center,
    overflow: :shrink_to_fit,
    single_line: true,
    size: pdf.bounds.height,
    valign: :center
end

#render_terminalObject



11
12
13
# File 'lib/tp/slide/header_only.rb', line 11

def render_terminal
  centered_header
end

#widthObject



15
16
17
# File 'lib/tp/slide/header_only.rb', line 15

def width
  header.length
end