Sha256: 69833982bf29132164a1188751782975d726106077673be7562c6a95721f57c1

Contents?: true

Size: 416 Bytes

Versions: 2

Compression:

Stored size: 416 Bytes

Contents

module TermNote
  module Pane
    class Text
      include Pane

      attr_accessor :title, :content

      def initialize(options)
        @title = options[:title] || options['title']
        @content = options[:content] || options['content']
      end

      def rows
        "#{title.center(width).bold}\n\n#{content}".split("\n").map do |row|
          row.center(width)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
termnote-1.1.0 lib/termnote/pane/text.rb
termnote-1.0.0 lib/termnote/pane/text.rb