Class: String

Inherits:
Object show all
Defined in:
lib/rider_server/core_ext/string.rb

Overview

string.rb – String extensions

Author: Russell Sim Copyright © 2024 Russell Sim SPDX-License-Identifier: MIT

Instance Method Summary collapse

Instance Method Details

#rider_displayObject

Return a string representation of the object in a consistent manner that will not be excessivly long.



13
14
15
16
17
18
19
# File 'lib/rider_server/core_ext/string.rb', line 13

def rider_display
  if length <= 50
    "#<String #{inspect}>"
  else
    "#<String \"#{self[0, 50]}...\" #{length - 50} more characters>"
  end
end