Method: Transcriptic::UI#truncate
- Defined in:
- lib/transcriptic/ui.rb
#truncate(text, length) ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/transcriptic/ui.rb', line 63 def truncate(text, length) if text.size > length text[0, length - 2] + '..' else text end end |