File: //usr/local/rvm/gems/default/doc/activesupport-6.1.4.1/ri/String/truncate-i.ri
U:RDoc::AnyMethod[iI"
truncate:ETI"String#truncate;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"eTruncates a given +text+ after a given <tt>length</tt> if +text+ is longer than <tt>length</tt>:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"='Once upon a time in a world far far away'.truncate(27)
;TI"(# => "Once upon a time in a wo..."
;T:@format0o;
; [I"WPass a string or regexp <tt>:separator</tt> to truncate +text+ at a natural break:;T@o;; [
I"M'Once upon a time in a world far far away'.truncate(27, separator: ' ')
;TI"%# => "Once upon a time in a..."
;TI"
;TI"N'Once upon a time in a world far far away'.truncate(27, separator: /\s/)
;TI"%# => "Once upon a time in a..."
;T;
0o;
; [I"aThe last characters will be replaced with the <tt>:omission</tt> string (defaults to "...") ;TI"6for a total length not exceeding <tt>length</tt>:;T@o;; [I"g'And they found that many people were sleeping better.'.truncate(25, omission: '... (continued)')
;TI"%# => "And they f... (continued)";T;
0:
@fileI"2lib/active_support/core_ext/string/filters.rb;T:0@omit_headings_from_table_of_contents_below000[ I" (truncate_at, options = {});T@%FI"String;TcRDoc::NormalClass00