Sha256: 04e8c822f068e7eb153894ce875fb7d9d2bcd317d916b670374abc7f95b38fe8

Contents?: true

Size: 288 Bytes

Versions: 4

Compression:

Stored size: 288 Bytes

Contents

class TP::Slide::Paragraph < TP::Slide
  def render
    centered_header +
      "\n\n" +
      paragraph
  end

  def paragraph
    buffer = content.wrap Screen.width
    buffer = buffer.center Screen.width if buffer.lines.one?

    buffer
  end

  def width
    content.length
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tp-0.5.1 lib/tp/slide/paragraph.rb
tp-0.5.0 lib/tp/slide/paragraph.rb
tp-0.4.1 lib/tp/slide/paragraph.rb
tp-0.4.0 lib/tp/slide/paragraph.rb