Sha256: e69c8be691a424cef1892b83e6e3f27f0d91795d4cb7d089939851a3aa89c975

Contents?: true

Size: 488 Bytes

Versions: 4

Compression:

Stored size: 488 Bytes

Contents

module TermNote
  module Pane
    class Text
      include Pane
      include Helpers::Title
      include Helpers::Content

      attr_accessor :title, :content

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

      private

      def rows
        title ? title_row + content_row : content_row
      end

      def gutter_width(row)
        width * 0.25
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
termnote-2.0.1 lib/termnote/pane/text.rb
termnote-2.0.0 lib/termnote/pane/text.rb
termnote-1.5.1 lib/termnote/pane/text.rb
termnote-1.5.0 lib/termnote/pane/text.rb