Class: Vedeu::Borders::Caption Private

Inherits:
Title
  • Object
show all
Defined in:
lib/vedeu/borders/caption.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

When a 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.

Instance Attribute Summary

Attributes inherited from Title

#horizontal, #name

Instance Method Summary collapse

Methods inherited from Title

#attributes, #border, #characters, #chars, #empty?, #end_index, #eql?, #geometry, #initialize, #pad, #render, render, #size, #to_s, #truncate, #value, #width, #x

Constructor Details

This class inherits a constructor from Vedeu::Borders::Title

Instance Method Details

#start_indexFixnum (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Fixnum)

See Also:



22
23
24
# File 'lib/vedeu/borders/caption.rb', line 22

def start_index
  (width - size) - 1
end

#yFixnum (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Fixnum)

See Also:



28
29
30
# File 'lib/vedeu/borders/caption.rb', line 28

def y
  geometry.yn
end