--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Extracts an excerpt from <tt>text</tt> that matches the first instance of <tt>phrase</tt>. The <tt>:radius</tt> option expands the excerpt on each side of the first occurrence of <tt>phrase</tt> by the number of characters defined in <tt>:radius</tt> (which defaults to 100). If the excerpt radius overflows the beginning or end of the <tt>text</tt>, then the <tt>:omission</tt> option (which defaults to &quot;...&quot;) will be prepended/appended accordingly. The resulting string will be stripped in any case. If the <tt>phrase</tt> isn't found, nil is returned.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  excerpt('This is an example', 'an', :radius =&gt; 5)\n  # =&gt; ...s is an exam...\n\n  excerpt('This is an example', 'is', :radius =&gt; 5)\n  # =&gt; This is a...\n\n  excerpt('This is an example', 'is')\n  # =&gt; This is an example\n\n  excerpt('This next thing is an example', 'ex', :radius =&gt; 2)\n  # =&gt; ...next...\n\n  excerpt('This is also an example', 'an', :radius =&gt; 8, :omission =&gt; '&lt;chop&gt; ')\n  # =&gt; &lt;chop&gt; is also an example\n"
- !ruby/struct:SM::Flow::P 
  body: "You can still use <tt>excerpt</tt> with the old API that accepts the <tt>radius</tt> as its optional third and the <tt>ellipsis</tt> as its optional forth parameter:"
- !ruby/struct:SM::Flow::VERB 
  body: "  excerpt('This is an example', 'an', 5)                   # =&gt; ...s is an exam...\n  excerpt('This is also an example', 'an', 8, '&lt;chop&gt; ')   # =&gt; &lt;chop&gt; is also an example\n"
full_name: ActionView::Helpers::TextHelper#excerpt
is_singleton: false
name: excerpt
params: (text, phrase, *args)
visibility: public
