Module: Byebug::CommandFunctions

Defined in:
lib/byebug/command.rb

Instance Method Summary collapse

Instance Method Details

#pad_with_dots(string) ⇒ Object

Pad a string with dots at the end to fit :width setting



11
12
13
14
15
# File 'lib/byebug/command.rb', line 11

def pad_with_dots(string)
  if string.size > Command.settings[:width]
    string[Command.settings[:width]-3 .. -1] = "..."
  end
end