Sha256: 085b157d2f4684987425b0cf0f141f63ed2ecf9f9f1b206ae00e642b41d6579a

Contents?: true

Size: 608 Bytes

Versions: 15

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Borders

    # When a {Vedeu::Borders::Border} has a caption, truncate it if
    # the caption is longer than the interface is wide, and pad with a
    # space either side.
    #
    # The caption is displayed within the bottom border of the
    # interface/view.
    #
    # @api private
    #
    class Caption < Vedeu::Borders::Title

      private

      # @return [Fixnum]
      def start_index
        (width - size) - 1
      end

      # @return [Fixnum]
      def y
        geometry.yn
      end

    end # Caption

  end # Borders

end # Vedeu

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vedeu-0.8.16 lib/vedeu/borders/caption.rb
vedeu-0.8.15 lib/vedeu/borders/caption.rb
vedeu-0.8.14 lib/vedeu/borders/caption.rb
vedeu-0.8.13 lib/vedeu/borders/caption.rb
vedeu-0.8.12 lib/vedeu/borders/caption.rb
vedeu-0.8.10 lib/vedeu/borders/caption.rb
vedeu-0.8.9 lib/vedeu/borders/caption.rb
vedeu-0.8.8 lib/vedeu/borders/caption.rb
vedeu-0.8.7 lib/vedeu/borders/caption.rb
vedeu-0.8.6 lib/vedeu/borders/caption.rb
vedeu-0.8.5 lib/vedeu/borders/caption.rb
vedeu-0.8.4 lib/vedeu/borders/caption.rb
vedeu-0.8.3 lib/vedeu/borders/caption.rb
vedeu-0.8.2 lib/vedeu/borders/caption.rb
vedeu-0.8.1 lib/vedeu/borders/caption.rb