File: //usr/local/rvm/gems/default/doc/actionview-6.1.4.1/ri/ActionView/Helpers/TextHelper/truncate-i.ri
U:RDoc::AnyMethod[iI"
truncate:ETI"-ActionView::Helpers::TextHelper#truncate;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"gTruncates a given +text+ after a given <tt>:length</tt> if +text+ is longer than <tt>:length</tt> ;TI"l(defaults to 30). The last characters will be replaced with the <tt>:omission</tt> (defaults to "...") ;TI"7for a total length not exceeding <tt>:length</tt>.;To:RDoc::Markup::BlankLine o;
; [I"FPass a <tt>:separator</tt> to truncate +text+ at a natural break.;T@o;
; [I"OPass a block if you want to show extra content when the text is truncated.;T@o;
; [I"aThe result is marked as HTML-safe, but it is escaped by default, unless <tt>:escape</tt> is ;TI"`+false+. Care should be taken if +text+ contains HTML tags or entities, because truncation ;TI"Fmay produce invalid HTML (such as unbalanced or incomplete tags).;T@o:RDoc::Markup::Verbatim; [I":truncate("Once upon a time in a world far far away")
;TI"+# => "Once upon a time in a world..."
;TI"
;TI"Ftruncate("Once upon a time in a world far far away", length: 17)
;TI"# => "Once upon a ti..."
;TI"
;TI"Vtruncate("Once upon a time in a world far far away", length: 17, separator: ' ')
;TI"# => "Once upon a..."
;TI"
;TI"ptruncate("And they found that many people were sleeping better.", length: 25, omission: '... (continued)')
;TI"&# => "And they f... (continued)"
;TI"
;TI"Atruncate("<p>Once upon a time in a world far far away</p>")
;TI"1# => "<p>Once upon a time in a wo..."
;TI"
;TI"Ptruncate("<p>Once upon a time in a world far far away</p>", escape: false)
;TI"+# => "<p>Once upon a time in a wo..."
;TI"
;TI"Vtruncate("Once upon a time in a world far far away") { link_to "Continue", "#" }
;TI"?# => "Once upon a time in a wo...<a href="#">Continue</a>";T:@format0:
@fileI"+lib/action_view/helpers/text_helper.rb;T:0@omit_headings_from_table_of_contents_below000[ I"!(text, options = {}, &block);T@2FI"TextHelper;TcRDoc::NormalModule00