Class: JRPC::Utils
- Inherits:
-
Object
- Object
- JRPC::Utils
- Defined in:
- lib/jrpc/utils.rb
Class Method Summary collapse
Class Method Details
.truncate(string, length, ommiter = '...') ⇒ Object
4 5 6 |
# File 'lib/jrpc/utils.rb', line 4 def self.truncate(string, length, ommiter = '...') "#{string[0..length]}#{ommiter if string.length > length}" end |