Method: CLI::UI::Frame.prefix_width
- Defined in:
- lib/cli/ui/frame.rb
.prefix_width ⇒ Object
The width of a prefix given the number of Frames in the stack : -> Integer
246 247 248 249 250 251 252 |
# File 'lib/cli/ui/frame.rb', line 246 def prefix_width w = FrameStack.items.reduce(0) do |width, item| width + item.frame_style.prefix_width end w.zero? ? w : w + 1 end |