Method: Vedeu::Borders::Refresh#caption_padded

Defined in:
lib/vedeu/borders/refresh.rb

#caption_paddedString (private)

Pads the caption with a single whitespace either side.

Examples:

caption = 'Truncated!'
width = 20
# => ' Truncated! '

width = 10
# => ' Trunca '

Returns:

  • (String)

See Also:



325
326
327
# File 'lib/vedeu/borders/refresh.rb', line 325

def caption_padded
  truncated_caption.center(truncated_caption.size + 2)
end